Follow

Copy Article

The Copy Article command allows you to create an exact copy of an existing article in your account.  It requires the following arguments: Command, Realm,  Password, Article Name and Destination Article Name.

api_web?r=myrealm&p=mypass&c=copyarticle&article_name=myarticle&dst_article_name=mycopyarticle

The command is ‘copyarticle’, the realm is ‘myrealm’ and the password is ‘mypass’. The a new article named 'mycopyarticle' will be created with the same settings as the article named 'myarticle'.

Example

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

api_web?r=myrealm&p=mypass&c=copyarticle&article_name=myarticle&dst_article_name=mycopyarticle

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

SUCCESS: 43

Results

The Copy Article command outputs either a SUCCESS or a FAILURE message. 

SUCCESS

The Copy Article command success message returns the id of the new article.  The result format is:

SUCCESS: [article_id]

FAILURE

A Copy Article command will fail for several reasons, such as if the source article does not exist or an article with the same name already exists.  The result format is:

FAILURE: [Reason]  

Arguments

The Copy Article command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=copyarticle

c=copyarticle

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 copy. To include spaces, use + or %20 to avoid possible issues with spaces in a URL.

article_name=[article_name]

Destination Article Name Yes Name of the new article. dst_article_name=[destination_ article_name]
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk