Obtaining the status of the task by using API


Use the Task status API to get the current status of the ETL tasks. 

Before you begin

Ensure that the following requirements are met:

  • The appropriate read or write activity is assigned to your user role to access the API. The user account must have the following permissions (through user roles):
    • READ: capacity_optimization.admin.etls_read or capacity_optimization.admin.admin_section_read
    • WRITE: capacity_optimization.custom_etl.edit or capacity_optimization.admin.admin_section_edit

For information about the user roles and permissions, see Default-user-roles-and-permissions.

Get the current status of the task

GET/opt/api/v1/backend/etls/<etl-id>/status

Retrieves the current status of the task, which can be one of the following:

  • RUNNING: The task is currently being executed.
  • SERVICE_ON: This status is related to service ETLs. The task is currently running (SERVICE_ON).
  • SERVICE_OFF: This status is related to service ETLs. The task is currently paused (SERVICE_OFF).
  • WAITING: The task is waiting to be executed at the specified time (meaning, the next execution has already been scheduled).
  • ENDED: The execution of the task was terminated and it has not been rescheduled.
  • ABORTED: The execution of the task was aborted.
  • no value: The task has never been executed nor has it been scheduled.


Request URL
https://<host_name>/opt/api/v1/backend/etls/<etl-id>/status
Example request URL
https://hostname.bmc.com/opt/api/v1/backend/etls/321/status
Request Header
Content-Type: application/json
Authorization: Bearer <jwttoken>

Sample response

Example 1
{
 "status": "ENDED",
 "task_id": 467,
 "exit_code": "ERROR",
 "last_exec_ts": "2022-09-06T12:07:34Z"
}
Example 2
{
 "status": "ENDED",
 "task_id": 321,
 "exit_code": "OK",
 "last_exec_ts": "2022-09-08T14:56:28Z"
}

Status codes and messages

HTTP code

Message

Description

204

OK

Request succeeded

400


ETL not found

500


Error


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix Continuous Optimization 22.4