Get Script Execution Status

Retrieve the status of a script execution action.

Synopsis

URI
/public_api/v1/scripts/get_script_execution_status/
HTTP Method
POST
Required License
Cortex XDR Pro per Endpoint

Description

Retrieve the status of a script execution action.

Request Fields

The body of this request contains a JSON object with the following fields:
Field
Description
request_data
(
Required
) A dictionary containing the API request fields.
action_id
(
Required
) Integer, identifier of the action, can be found in Cortex XDR console
Response
Action Center
Action ID
field.
Request Example
curl -X POST https://api-{fqdn}/public_api/v1/scripts/get_script_execution_status/ \ -H "x-xdr-auth-id:{API_KEY_ID}" \ -H "Authorization:{API_KEY}" \ -H "Content-Type:application/json" \ -d '{ "request_data":{"action_id": "<action ID>"} }'
Code copied to clipboard
Unable to copy due to lack of browser support.

Success Response

Upon success, the HTTP response code is 200.
Field
Description
reply
JSON object containing the query result.
general_status
String , general status of the action, considering the status of all the endpoints.
error_message
String, error message regarding permissions for running APIs or the action doesn’t exist.
endpoints_timeout
Integer, number of endpoints in “timeout” status.
endpoints_pending_abort
Integer, number of endpoints in “pending abort” status.
endpoints_pending
Integer, number of endpoints in pending status.
endpoints_in_progress
Integer, number of endpoints in “in progress” status.
endpoints_failed
Integer, number of endpoints in “failed” status.
endpoints_expired
Integer, number of endpoints in “expired” status.
endpoints_completed_successfully
Integer, number of endpoints in “completed successfully” status.
endpoints_canceled
Integer, number of endpoints in “canceled” status.
endpoints_aborted
Integer, number of endpoints in “aborted” status.
Success Response Example
{ "reply":{ "general_status":"PENDING", "endpoints_pending":1, "endpoints_canceled":0, "endpoints_in_progress":0, "endpoints_timeout":0, "endpoints_failed":0, "endpoints_completed_successfully":0, "endpoints_pending_abort":0, "endpoints_aborted":0, "endpoints_expired":0 } }
Code copied to clipboard
Unable to copy due to lack of browser support.

Error Response

Upon error, the reply includes an HTTP response code, an error message, and additional information describing the error. The HTTP response code is one of the following:
Field
Description
400
Bad Request. Got an invalid JSON.
401
Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.
402
Unauthorized access. User does not have the required license type to run this API.
403
Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.
500
Internal server error. A unified status for API communication type errors.
Error Response Format
{"reply": {"err_code": STATUS_CODE, "err_msg": GENERAL_MESSAGE, "err_extra": EXTRA_DATA}}
Code copied to clipboard
Unable to copy due to lack of browser support.

Recommended For You