Get Diagram Image

From Creately Developer

Jump to: navigation, search

Contents

Description

This method allows you to get a PNG image of a existing document. If you need to get the image of a public diagram, you can simply use a direct link as specified in Direct Links

Request

Request Details

URL https://creately.com/api/document
HTTP Method GET and 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 "getimage". Will indicate that this is a Get Diagram Image action. Mandatory N/A
docid The unique identifier of the document. Mandatory N/A
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 The image data as Multipart OR XML
Content On a successful result, the image data would be sent as a multipart. On failure a XML will be sent

Response Parameters

Tag Description
success Indicates if the request was successfully processed. Only if the value false
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 Get diagram image method are: 1201, 1401, 1402, 1405

Examples

Example 1

Request

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

Response The PNG file of the diagram in multipart form

Personal tools