Import\Export
  • 11 Aug 2022
  • 3 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Import\Export

  • Dark
    Light
  • PDF

Download object

Method for downloading objects from Corezoid.

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

URL

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

Request Example

{
    "ops": [
        {
            "obj": "obj_scheme",
            "obj_id": {{OBJ_ID}},
            "obj_type": {{OBJ_TYPE}},
            "company_id": {{COMPANY_ID}},
            "with_alias": false,
            "async": true,
            "format": "zip"
        }
    ]
}
Parameter Type Required Description Possible value
obj string + The object of request obj_scheme, node
obj_id number / number as string + ID of the object that will be downloaded ID of an object of the supported type
obj_type string + Type of the object to download conv, folder, dashboard, instance, project, stage, version
company_id string + ID of the Company, to which the file will be uploaded An ID of an existing Company
async boolean + Request execution method true, false
with_alias boolean - Defines whether the object is downloaded with its available Aliases. Used for obj_type=conv, folder. When not specified, the object is downloaded with its available Aliases true, false
format string + Format of the file that will be downloaded json, zip

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "proc": "ok",
            "obj": "obj_scheme",
            "download_url": "https://admin.corezoid.com/user_downloads/conv_783260_1596794882.json",
            "statistics_id": "83680364000C726F7574696E675F7061636B6D0000001C6D756C742E6374726C2E6170702D6D772D6D756C742D335F6D756C746D0000000C5F2D280291D0CA186F00001D"
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops JSON Object The list of operations performed via Corezoid API. A parameter keeping JSON objects with operations
obj string An object of request obj_scheme, node
proc string The processing status of a specific operation ok, error
download_url string URL to downloading file
statistics_id string Deprecated

Upload object from file

Method for uploading objects to Corezoid from the file.

URL

https://api.corezoid.com/api/2/upload

Request Example

curl --location --request POST 'https://admin.corezoid.com/api/2/upload/777/123/aa4r4r0f43d4cdff3f13cacb5b2730198f' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--form 'type=create' \
--form 'obj=obj_scheme' \
--form 'obj_to_id=${OBJ_TO_ID}' \
--form 'scheme=${SCHEME}' \
--form 'company_id=${COMPANY_ID}' \
--form 'obj_to_type=${OBJ_TO_TYPE}' \
--form 'with_alias=false' \
--form 'rewrite_alias=false' \
--form 'async=true'

Please, use the request above for uploading objects via Corezoid API with a cookie. If you need to upload an object using the signature, use Bash script.

Parameter Type Required Description Possible value
type string + A request type create
obj string + An object of request obj_scheme, node
obj_to_id number + ID of the Object, to which the file will be uploaded "0" for a root folder or an ID of an existing Project, Stage or Folder
scheme file + Name of the file containing the scheme of objects that will be uploaded
company_id string + ID of the Company, to which the file will be uploaded An ID of an existing Company
obj_to_type string + Type of the object, to which the file will be uploaded project, stage, folder
with_alias boolean - Defines whether the object is uploaded with its available Aliases. Used for obj_type=conv, folder. When not specified, the object is uploaded without its Aliases true, false
rewrite_alias boolean + Defines whether the existing alias is rewritten during the import true, false
async boolean + Asynchronous request execution method true, false

Be sure to check values of body parameters in the pre-reques script - obj_to_id, company_id, scheme, etc. values need to match the parametrs from the request body.

Response Body (sync)

{
    "request_proc": "ok",
    "ops": [
        {
            "obj": "obj_scheme",
            "proc": "ok",
            "scheme": [
                {
                    "obj_id": 349505,
                    "obj_type": "folder",
                    "title": "JIRA",
                    "description": "",
                    "old_obj_id": 300779,
                    "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 JSON Object The list of operations proceeded via Corezoid API. A parameter keeping JSON objects with operations
obj string The object of request obj_scheme, node
proc string The processing status of a specific operation ok, error
scheme JSON Object Scheme of uploaded data
scheme.obj_id number An ID of created object
scheme.obj_type string The type of created object conv, folder, dashboard, instance, project, stage, version
scheme.title string The name of created object
scheme.description string The description of created object
scheme.old_obj_id number The ID of the original object
scheme.old_parent_id number The ID of the original object nesting

Response Body (async)

{
    "request_proc": "ok",
    "ops": [
        {
            "obj": "obj_scheme",
            "proc": "ok",
            "hash": "836803642E6374726C2E6170702D6D77234FE32G756C746D0000000C5F2C3BD391D0CA3712000093"
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops JSON Object The list of operations performed via Corezoid API. A parameter keeping JSON objects with operations
obj string An object of request obj_scheme, node
proc string The processing status of a specific operation ok, error
hash string

Was this article helpful?