Skip to content

Query details for a specified job

This topic describes how to use an API to query details for a specified job.

API path

api-open/v1/jobs/<job_id>

<job_id>: The job ID. See request parameters below.

Request parameters

Path parameters

Parameters Type If required Default value Example Description
job_id number yes - 1964 The job ID. It can be queried through the API Get a list of all jobs or viewed on the job list page.

Headers parameters

Parameters Type If required Default value Example Description
Content-Type string yes - application/json The content type.
explorer_token string yes - eyJhbxxx The authorization token that is used to verify account information. For details, see Workflow API overview.

Body parameters

None.

Request example

curl -i -X GET -H "Content-Type: application/json" -H "Cookie: "explorer_token=eyJhbxxx"" http://192.168.8.145:7002/api-open/v1/jobs/1964

Response parameters

Parameters Type Example Description
code number 0 The result code of the request. Return 0 if the request is successful, and return an error code if the request is unsuccessful. For details, see Workflow API overview.
message string Success The result information of the execution.
data object - The list of returned data.
    - id number 1964 The job ID.
    - name string workflow_xkkjf_20220712103332 The job name.
    - workflowId string 3992429968 The workflow ID.
    - workflowName string workflow_xkkjf The workflow name.
    - status number 2 The job status code. For details, see Workflow API overview.
    - tasks object - The task details.
       - id string f93dea90fc3a11ecac7e6da0662c195b The task ID.
       - name string BFS The task name.
       - runBeginTime datetime 2022-07-12T10:33:35+08:00 The start time of the task execution.
       - runEndTime datetime 2022-07-12T10:33:38+08:00 The end time of the task execution.
       - status number 2 The task status code. For details, see Workflow API overview.

Response example

{
  "cookie": [],
  "Content-Type": "application/json",
  "Traceparent": "00-3db17c9fd9e0a4c3824973471523d214-4384705e523dce83-00",
  "Date": "Fri, 15 Jul 2022 09:08:20 GMT",
  "Content-Length": "400"
}
{
  "code": 0,
  "data": {
    "id": 1964,
    "name": "workflow_xkkjf_20220712103332",
    "workflowId": "3992429968",
    "workflowName": "workflow_xkkjf",
    "status": 2,
    "tasks": [
      {
        "id": "f93dea90fc3a11ecac7e6da0662c195b",
        "name": "BFS",
        "runBeginTime": "2022-07-12T10:33:35+08:00",
        "runEndTime": "2022-07-12T10:33:38+08:00",
        "status": 2
      }
    ],
    "runBeginTime": 1657593215000,
    "runEndTime": 1657593218000,
    "createTime": 1657593212505
  },
  "message": "Success"
}

Last update: December 6, 2022