Copy Object
  • 01 Jun 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Copy Object

  • Dark
    Light
  • PDF

Copy object

Method for copying object (including copying between companies).

postman Download our collection of Postman queries to see more examples of Corezoid API v2.

URL

https://api.corezoid.com/api/2/copy/{API_LOGIN}/{TIMESTAMP}/{SIGNATURE}

Request Body

{
    "ops": [
        {
            "type": "create",
            "obj": "obj_copy",
            "obj_type": {{OBJ_TYPE}},
            "obj_id": {{OBJ_ID}},
            "obj_to_id": {{OBJ_TO_ID}},
            "obj_to_type": {{OBJ_TO_TYPE}},
            "title": {{TITLE}},
            "ignore_errors": true,
            "async": false,
            "from_company_id": {{FROM_COMPANY}},
            "to_company_id": {{TO_COMPANY}}
        }
    ]
}
Parameter Type Required Description 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 request type create
obj string + An object of request obj_copy
obj_type string + A type of object of request folder, conv, dashboard
obj_id number + An ID of object that you want to copy An ID of an existing Folder, Process or State diagram
obj_to_id number + ID of the object, to which you want to copy ID of an existing Folder, Process or State diagram
obj_to_type string + Type of the object, to which you want to copy ID of an existing Folder, Process or State diagram
title string + Object copy name ---
ignore_errors boolean - A flag for errors handling. true by default true, false
async boolean - An request execution method. true by default true, false
from_company_id string - ID of the Company, in which the object is stored ID of an existing Company
to_company_id string - ID of the Company, in which the object copy will be stored ID of an existing Company

Response Body (async = false)

{
    "request_proc": "ok",
    "ops": [
        {
            "obj": "obj_copy",
            "proc": "ok",
            "scheme": [
                {
                    "obj_id": 786872,
                    "hash": "c7db16ef3e54f5d399739fe416d36c94a7103e7f",
                    "obj_type": "conv",
                    "title": "",
                    "description": "Here will be a detailed description of process",
                    "old_obj_id": 783229,
                    "old_parent_id": 0
                }
            ]
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops array The list of request results
obj string Object of request obj_copy
proc string The processing status of a specific operation ok, error
scheme array Scheme of copied data ---
scheme.obj_id number The ID of an object copy An ID of an existing Process or State diagram
scheme.hash string The hash of Direct URL task upload
scheme.obj_type string A type of an object copy folder, conv, dashboard
scheme.title string A Name of an object copy
scheme.description string A description of an object copy
scheme.old_obj_id number An ID of original object
scheme.old_parent_id number An ID of original object nesting

Response Body (async = true)

{
    "request_proc": "ok",
    "ops": [
        {
            "proc": "ok",
            "obj": "obj_copy",
            "statistics_id": "copy_conv_783229_Ssy2TjLagZ.zip"
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops array The list of request results
id string Request ID empty
proc string The processing status of a specific operation ok, error
obj string --- obj_copy
statistics_id string An ID of statistic data

Was this article helpful?

What's Next