Follow

Create Article

The Create Article commands allow you to define and create a new article of content to include in your template.  The command allows you to specify several components of an article, such as Callout and Body.  

The Create Blank Article command requires the following arguments: Command, Realm, Password, and Article Name.

api_web?r=myrealm&p=mypass&c=createblankarticle&article_name=MyArticleBlank

The command is ‘createblankarticle’, the realm is ‘myrealm’ and the password is ‘mypass’.  The new, empty article will be named ‘MyArticleBlank’.

The Create Article command requires the following arguments: Command, Realm, Password, and Article Name.  Releases prior to v12.05 also require Folder ID.

api_web?r=myrealm&p=mypass&c=createarticle&article_name=MyArticle&folder_id=123

The command is ‘createarticle’, the realm is ‘myrealm’ and the password is ‘mypass’. The new, empty article will be named ‘MyArticle’ stored in folder ID 123.

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=createarticle&article_name=myarticle&article_title=Title&article_description=Test&deck=Deck&callout=Callout&author_name=Jane&author_bio=Me&author_email=jane%40domain.com&folder_id=123&article_body=Body%20Content

Successful results return, where ‘42’ is the ID of the new article:

SUCCESS: 42

You can also POST the values, which allows you to send much larger body data.

Results

The Create Article commands output either a SUCCESS or FAILURE message. 

SUCCESS

The Create Article command success message returns the ID of the new article.  The result format is:

SUCCESS: [article_id]

FAILURE

A Create Article command will fail if an article with the same name already exists or invalid data is passed.  The result format is:

FAILURE: [Reason]

Arguments

The Create Article commands support the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=[createarticle, createblankarticle]

c=[createarticle, createblankarticle]

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Article Name

Yes

Name of the article to create. To include spaces, use + or %20 to avoid possible issues with spaces in a URL.

article_name= [article_name]

Title

 

Title of the article.

article_title=[article_title]

Description

 

Internal description of the article.

article_description=[article_description]

Deck

 

Deck text for the article.

deck=[article_deck]

Callout

 

Callout text for the article.

callout=[article_callout]

Body

 

Body content of the article.  Can be created as plain text or HTML.  To avoid possible errors, put article_body content at the end of the call.

article_body=[article_body]

Author Name

  Name of the article author. author_name=[author_name]

Author Bio

  Biography for the article author. author_bio=[author_bio]

Author Email

  Email of the article author. author_email=[author_email]

Folder

*

Identifier of the Folder to associate the Creative for organization.  Default folder is 0, or Unfiled. *This is required in versions prior to v12.05 for 'createarticle' only.

folder_id=[folder_id]

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk