Task archive and Nodes counters
  • 16 Oct 2020
  • 10 Minutes To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Task archive and Nodes counters

  • Print
  • Share
  • Dark
    Light

Download Task Archive from Node

Method for downloading task archive from nodes.

URL

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

Request Body

{
    "ops": [
        {
            "obj": "node",
            "obj_id": {{NODE_ID}},
            "conv_id": {{CONV_ID}},
            "select": {{RANGE}},
            "offset": 0,
            "limit": 50000,
            "extra_columns": [
                "ref",
                "task_id",
                "status",
                "user_id",
                "create_time",
                "change_time",
                "node_prev_id"
            ],
            "start": {{START_TIMESTAMP}},
            "end": {{END_TIMESTAMP}},
            "format": "csv",
            "company_id": {{COMPANY_ID}}
        }
    ]
}
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.
obj string + An object of request node
obj_id string + An ID of node An ID of an existing Node
conv_id number / number as string + An ID of process or state diagram that you want to download task archive An ID of an existing Process or State diagram
select string + Selection criterion custom, fromTo, last1hour, last6hour, last12hour, last24hour
offset number - (Required only for select = custom) A number of tasks that should be skipped when getting the selection Any positive number
limit number + A number of max results in report We not recommend to set this parameter over 50000
extra_columns array - Set of system parameters that you want exprt See https://doc.corezoid.com/docs/task-archive#system-parameters to get more details
start number / number as string - (Required only for select = fromTo) The start timestamp of the selection, timestamp 1596614666
end number (timestamp) - (Required only for select = fromTo) The end timestamp of the selection, timestamp 1596694666
format string + A format of an downloading file csv
company_id string - An ID of a Company, where sharing object stored An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "download_url": "https://admin.corezoid.com/user_downloads/785147_conv_5f2c355282ba96377a66642a_1597664813.csv",
            "statistics_id": "785147_conv_5f2c355282ba96377a66642a_1597664813.csv",
            "obj": "node",
            "proc": "ok"
        }
    ]
}
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
download_url string URL to downloading file
statistics_id string
obj string An object of request node
proc string The processing status of a specific operation ok, error

Get .csv with Task Archive from Node

Method for getting .csv with Task Archive from Node.

Note: Method of this request is GET

URL

https://admin.corezoid.com/user_downloads/{{download_url}}/{{LOGIN}}/{{TIMESTAMP}}/{{SIGNATURE}}

{{download_url}} - URL to downloading file that you receive in responce to the Download Task Archive from Node request

In response you receive the body of the file with task archive you previously create with the Download Task Archive from Node request

Get node statistic by ID for preiod

Method for downloading task archive from nodes.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{GMT_UNIXTIME}/{SIGNATURE}

Request Body

{
   "ops":[
      {
         "type": "show",
         "obj": "stat",
         "conv_id": {{CONV_ID}},
         "node_id": {{NODE_ID}},
         "interval": {{INTERVAL}},
         "group": "time",
         "start": {{START_TIMESTAMP}},
         "end": {{END_TIMESTAMP}},
         "company_id": {{COMPANY_ID}}
      }
   ]
}
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 show
obj string + An object of request stat
conv_id number / number as string + An ID of process or state diagram that you want to get task statistics An ID of an existing Process or State diagram
node_id string + An ID of node An ID of an existing Node
interval string + A time intrval to group statistics minute, hour, day
group string + Grouping settings time
start number / number as string + The start timestamp of the selection, timestamp 1596614666
end number (timestamp) + The end timestamp of the selection, timestamp 1596694666
company_id string - An ID of a Company, where sharing object stored An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj": "stat",
            "node_id": "5f2c355282ba96377a66642a",
            "title": "Final",
            "group": "time",
            "conv_id": 785147,
            "dashboard_id": "undefined",
            "data": [
                {
                    "date": "2020-08-17 10:00:00",
                    "in": 12,
                    "out": 0
                },
                {
                    "date": "2020-08-17 13:00:00",
                    "in": 25,
                    "out": 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
id A request id empty
proc string The processing status of a specific operation ok, error
obj string An object of request stat
node_id string An ID of Node An ID of an existing Node
title string A Node title
group string Grouping settings time
conv_id number An ID of process or state diagram An ID of an existing Process or State diagram
dashboard_id Deprecated parameter undefined
data array An array with report data ---
date string A value of time "YYYY-MM-DD HH:MM:SS", "YYYY-MM-DD"
in number A number of tasks processed by Node
out number A number of tasks that leave Node

Get Node Archive by Node ID with offset

Method for downloading task archive from nodes.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{GMT_UNIXTIME}/{SIGNATURE}

Request Body

{
   "ops": [
      {
         "type": "list",
         "obj": "node",
         "obj_id": "5f27eb55513aa01f9a341e99",
         "node_id": "5f27eb55513aa01f9a341e99",
         "conv_id": 780593,
         "offset": 10,
         "limit": 10,
         "company_id": "i072781464"
      }
   ]
}
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 for deleting User to Users Group +
obj string + An object of request +
obj_id string + An ID of a Node that you want to get task archive An ID of an existing User
node_id string + An ID of a Node that you want to get task archive
conv_id number / number as string + An ID of an Process/State Diagramm where Node that you want to get task archive stored An ID of an existing Process/State Diagramm
offset number - Specify the offset of the first task to return 0
limit number + Specify the number of tasks to return +
company_id string + An ID of an Company, where Users Group stored An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "obj": "node",
            "obj_id": "5f2c355282ba96377a66642a",
            "count": 37,
            "proc": "ok",
            "list": [
                {
                    "data": {
                        "jql": "",
                        "search_string": "assignee = curentUser()",
                        "issuesKey": [
                            5000,
                            5001,
                            5005
                        ]
                    },
                    "obj": "task",
                    "obj_id": "5f3a8623513aa01f9ae0842c",
                    "ref": "159767094534774",
                    "status": "processed",
                    "user_id": 76369,
                    "create_time": 1597670947,
                    "change_time": 1597670947,
                    "node_prev_id": "5f3a85e682ba96377ae95007"
                },
                ....
                {
                    "data": [],
                    "obj": "task",
                    "obj_id": "5f3a5fd5513aa01f9ade0a41",
                    "ref": "159766114145443",
                    "status": "processed",
                    "user_id": 76369,
                    "create_time": 1597661141,
                    "change_time": 1597661141,
                    "node_prev_id": "5f2c355282ba96377a66642b"
                }
            ]
        }
    ]
}
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 A request id empty
proc string The processing status of a specific operation ok, error
obj string An object of request node
obj_id string An ID of node An ID of an existing Node
count number A total number of tasks in response
list array An array of tasks
list.data JSON Object Task data
list.obj string The Task object task
list.obj_id string An id of the Task
list.ref string A Task reference
list.status string A Task status processed
list.user_id number An ID of the User that create Task
list.create_time number Timestamp of Task creation
list.change_time number Timestamp of Task last changes
list.node_prev_id string The previous node on Task path An ID of an existing Node

Get Nodes and their counters of Process or State Diagram

Method for getting Nodes and their counters of Process or State Diagram.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{GMT_UNIXTIME}/{SIGNATURE}

Request Body

{
    "ops":[
        {
            "type":"list",
            "obj":"conv",
            "obj_id": 783230,
            "company_id": {{COMPANY_ID}}
    	}
  	]	
}
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 list
obj string + An object of request conv
obj_id number + An ID of object that you want to An ID of an existing Process or State diagram
company_id string - An ID of a Company An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "obj": "conv",
            "obj_id": 783230,
            "privs": [
                {
                    "type": "delete",
                    "list_obj": [
                        "all"
                    ]
                },
                {
                    "type": "create",
                    "list_obj": [
                        "all"
                    ]
                },
                {
                    "type": "view",
                    "list_obj": [
                        "all"
                    ]
                },
                {
                    "type": "modify",
                    "list_obj": [
                        "all"
                    ]
                }
            ],
            "status": "debug",
            "title": "Process #1",
            "description": "Here will be a detailed description of process",
            "conv_type": "process",
            "is_owner": true,
            "owner_name": "New API v2",
            "owner_id": 76370,
            "owner_login": "5f27db1e82ba96377a3606af",
            "proc": "ok",
            "list": [
                {
                    "obj": "node",
                    "obj_id": "5f2ac080513aa01f9a513315",
                    "title": "",
                    "description": "",
                    "logics": [],
                    "semaphors": [],
                    "count": 0,
                    "obj_type": 2,
                    "position": [
                        16,
                        204
                    ],
                    "extra": "{\"modeForm\":\"collapse\",\"icon\":\"error\"}"
                },
                {
                    "obj": "node",
                    "obj_id": "5f2ac080513aa01f9a513314",
                    "title": "",
                    "description": "",
                    "logics": [],
                    "semaphors": [
                        {
                            "type": "time",
                            "value": 30,
                            "dimension": "sec",
                            "to_node_id": "5f2ac080513aa01f9a513312",
                            "id": "b39592e1-1d5a-4885-aae2-c39448946930"
                        }
                    ],
                    "count": 0,
                    "obj_type": 0,
                    "position": [
                        -116,
                        80
                    ],
                    "extra": "{\"modeForm\":\"collapse\",\"icon\":\"\"}"
                },
                {
                    "obj": "node",
                    "obj_id": "5f2ac080513aa01f9a513313",
                    "title": "",
                    "description": "",
                    "logics": [
                        {
                            "type": "go_if_const",
                            "to_node_id": "5f2ac080513aa01f9a513314",
                            "conditions": [
                                {
                                    "fun": "eq",
                                    "const": "hardware",
                                    "param": "__conveyor_code_return_type_error__",
                                    "cast": "string"
                                }
                            ],
                            "id": "0aa39e7b-a3aa-44e0-8376-42ef4f10c401"
                        },
                        {
                            "type": "go_if_const",
                            "to_node_id": "5f2ac080513aa01f9a513315",
                            "conditions": [
                                {
                                    "fun": "eq",
                                    "const": "software",
                                    "param": "__conveyor_code_return_type_error__",
                                    "cast": "string"
                                }
                            ],
                            "id": "b596ca78-053f-4a89-a500-67812bab78de"
                        },
                        {
                            "type": "go",
                            "to_node_id": "5f2ac080513aa01f9a513315",
                            "id": "cd24228a-6bea-4402-ab0d-bf215a9e3c85"
                        }
                    ],
                    "semaphors": [],
                    "count": 0,
                    "obj_type": 3,
                    "position": [
                        -116,
                        176
                    ],
                    "extra": "{\"modeForm\":\"collapse\",\"icon\":\"\"}"
                },
                {
                    "obj": "node",
                    "obj_id": "5f2ac080513aa01f9a513312",
                    "title": "",
                    "description": "",
                    "logics": [
                        {
                            "type": "api_code",
                            "err_node_id": "5f2ac080513aa01f9a513313",
                            "id": "fec4e069-e79e-4073-8c65-70a13e7c2a5d",
                            "lang": "js",
                            "src": "var foo = \"bar\";\ndata.test = foo;"
                        },
                        {
                            "id": "158d8848-55ff-424c-9187-1401321af6b9",
                            "type": "go",
                            "to_node_id": "5f2a65d182ba96377a51cba6",
                            "chTime": 1596637311971
                        }
                    ],
                    "semaphors": [],
                    "count": 0,
                    "obj_type": 0,
                    "position": [
                        -368,
                        84
                    ],
                    "extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}"
                },
                {
                    "obj": "node",
                    "obj_id": "5f2a65d182ba96377a51cba6",
                    "title": "final",
                    "description": "",
                    "logics": [],
                    "semaphors": [],
                    "count": 0,
                    "obj_type": 2,
                    "position": [
                        -268,
                        264
                    ],
                    "extra": "{\"modeForm\":\"collapse\",\"icon\":\"success\"}"
                },
                {
                    "obj": "node",
                    "obj_id": "5f2a65d182ba96377a51cba4",
                    "title": "start",
                    "description": "",
                    "logics": [
                        {
                            "id": "7db5e619-14cd-429c-8c4e-1de19897d957",
                            "type": "go",
                            "to_node_id": "5f2ac080513aa01f9a513312",
                            "chTime": 1596637306041
                        }
                    ],
                    "semaphors": [],
                    "count": 0,
                    "obj_type": 1,
                    "position": [
                        -268,
                        12
                    ],
                    "extra": "{\"modeForm\":\"collapse\",\"icon\":\"\"}"
                }
            ],
            "escalation_conv": "undefined",
            "shared": true,
            "folder_id": 0,
            "folder_name": "root",
            "change_time": 1596710921,
            "create_time": 1596614097,
            "tacts": 202,
            "favorite": false,
            "company_id": "i404856373",
            "commits": {},
            "size": 6,
            "last_confirmed_version": 1596713458
        }
    ]
}
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 A request id empty
obj string An object type folder, conv, dashboard
obj_id number An ID of object
privs array An array of users rights settings over shared object view, create, modify, delete
status string A current state of object active, paused, debug, blocked
title string A name of object
description string A description of object
conv_type string A type of object process, state
is_owner boolean A flag of ownership over object true, false
owner_name string A Name of object owner
owner_id number An ID of object owner
owner_login string A Login of object owner
proc string The processing status of a specific operation ok, error
list array The list of object logic (Nodes) ---
list.obj string A type of object node
list.obj_id string An ID of node ---
list.title string A name of node
list.description string A description of node ---
list.logics array An array of node settings ---
list.semaphors array An array of node escalations settings ---
list.count number (AVAILABLE FOR get_counter = true) A number of tasks in the node
list.obj_type number An identifier of node type 0 (logic node), 1 (start node), 2 (final node)
list.position array An array of x and y coordinates ---
list.extra string An stringfy object of additional node settings (expand or minimize, node icon) ---
escalation_conv --- Deprecated fied ---
shared boolean A flag of sharing status true, false
folder_id number An ID of folder where object stored
folder_name string A Name of folder where object stored ---
change_time timestamp Timestamp of last changes ---
create_time timestamp Timestamp of object creation ---
tacts number A number of tacts used by object over all time ---
favorite boolean A flag of adding object to favorites true, false
company_id string An ID of an Company where object stored ---
commits JSON Object A list of saved but not deployed changes of object
size number A number of Nodes of object
last_confirmed_version number An ID of last deployed version of object
Was This Article Helpful?