Example of a Request Sent to Sync API From External Services
  • 08 Nov 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Example of a Request Sent to Sync API From External Services

  • Dark
    Light
  • PDF

Generating Requests to Sync API from External Services

postman Use our collection of Postman queries as an example

URL

https://sync-api.corezoid.com/api/1/json/{{API_LOGIN}}/{{TIMESTAMP}}/{{SIGNATURE}}
  • {{API_LOGIN}} - authorization login
  • {{GMT_UNIXTIME}} - request time
  • {{SIGNATURE}} - request signature

Request time should be Unix time: number of seconds elapsed from the Unix epoch at the GMT+0 Time Zone.

Request signature is created according to the standard Corezoid API protocol.

You need to grant access to Task management to an API key, which login and password are used in the request.

Request Body

{
    "timeout": 30,
    "ops": [{
        "conv_id": {{CONV_ID}},
        "type": "create",
        "obj": "task",
        "data": {
            "param": 1
        }
    }]
}
parameter accept type description required possible value
ops JSON Object The list of operations to proceed via Corezoid API. A parameter keeping JSON objects with operations + * The number is user-limited by RPS limit.
type string A type for creating a Task + create
conv_id number / number as string An ID of a Process for which the Task is created + An ID of an existing Process
obj string An object type + task
data JSON Object An object with key-value pairs describing necessary parameters + ** The quantity of parameters is not limited
timeout number The maximum time of waiting for the response - The number of seconds, default value is 60 seconds

*See the license agreement

**A Task is limited to a size specified in a configuration file.

Response

{
    "ops": [
        {
            "proc": "ok",
            "data": {
                "info": {
                    "param_1": "value_1",
                    "param_2": "value_2",
                    "param_3": "value_3"
                }
            }
        }
    ],
    "request_proc": "ok"
}
parameter value description
request_proc It is ok for the successful accomplishment or error otherwise The global processing status of the whole package
ops [] A list of operations as requested
ops[n].proc It is ok for the successful accomplishment or error otherwise Processing status of a given operation
data An object with key-value pairs describing necessary parameters Data specified for response in the API Call node

To see examples of creating tasks by Alias with Sync API, see the Postman queries collection available by the link above and the API articles.