Copy a Diagram

From Creately Developer

Jump to: navigation, search

Contents

Description

This method makes a copy of a document that is specified by the Document ID. The copied document will be owned by the given user. If the given user has permission to the source project, the copy made would be placed in the same project. If the user does not have permission to the source project, the copy made would be placed in the users Home Project.

Request

Request Details

URL https://creately.com/api/document
HTTP Method POST
Supported Authentication CT or SA
API Permissions This API call will not require any permissions
User Permissions The user will need to have access permission to the given document OR the given document should be a public document.

Request Parameters

Parameter Description Required Default Value
action Must contain the value "copydoc". Will indicate that this is a Document Copy action. Mandatory N/A
docid The unique identifier of the document that needs to be copied. Mandatory N/A
name A string for the name of the new document Optional Empty
returnxml A boolean value indicating "true" or "false". Specifies if response should be a XML. Response will be sent in a XML if the value is true. Response will be sent in a serial string if the value is false. Optional true

NOTE: Parameters required by the authentication method must be provided. See what parameters are required in Authentication

Response

Response Details

Type XML
Content The document ID of the newly copied document will be returned on successful response.

Response Parameters

Tag Description
success Indicates if the request was successfully processed. May have true or false
copied-doc-id The unique ID of the newly created document.
errorcode Will be available if the success parameter was false. Will contain a valid API Error code. Valid error codes are listed in API Error Codes
message Will be available if the success parameter was false. Will contain a string message for the error

Errors

Refer to Errors related to Document API calls in the Error Codes
Possible errors for Copy Document method are: 1107, 1201, 1401, 1403, 1405, 1406, 1414, 1415, 1418, 1419, 1420, 1422

Examples

Example 1

Request

https://creately.com/api/document?apikey=2njk4234j23hkj23h4j2k3423jk4h&sig=jkn435654jk2j1kjh3mjk9&usr=johndoe@achme.com&action=copydoc&docid=f5dm432g&name=NiceFlow

Response

	<creately-api-response>
 		<success>true</success>
 		<copied-doc-id>f42u4hjwk4</copied-doc-id>
 	</creately-api-response>
Personal tools