Target Runs

APIs to manage Target Runs. Target run status descriptions

  • PENDING - Target run created.
  • QUEUED - Target run queued for processing.
  • PROCESSING - Target run received by scheduler for processing (During target run processing the command request for the target run is created).
  • DISPATCHED - Target run moves to dispatched when a command is successfully queued for the target run. (Command status - QUEUED)
  • RUNNING - Target run moves to running state when the command has been sent to the device (Command status - INITIATED, ACKNOWLEDGED, INPROGRESS)
  • COMPLETE - Target run moves to complete state when it has completed running (Command status - FAILURE, SUCCESS, TIMEOUT, CANCELLED)
  • SUCCESS - A completed target run moves to success when the associated command is successful (Command status - SUCCESS)
  • FAILURE - A completed target run moves to success when the associated command is unsuccessful (Command status - FAILED, TIMEOUT, CANCELLED)
  • CANCELLED - Target run cancelled by the user (Target runs ind Pending, Queued and Processing state can be cancelled by the user)
  • TIMEOUT - The target run has a timed out. This happens when the target run has not completed processing even after the timeout period (7 days).
  • INVALID - Target run is invalid.

Get all Target Runs for the Stage Run

SecuritySCAPIAuthToken
Request
path Parameters
stage_run_id
required
string

Stage run Id

query Parameters
status
string

Status of target run

Enum: "pending" "queued" "processing" "dispatched" "running" "complete" "success" "failure" "cancelled" "invalid" "timeout"
stage_run_operation_id
string <uuid>

Stage run Operation Id to filter on

ordering
string

Sorting target runs based on status field

Enum: "status" "-status"
Responses
200

All Target runs for the Stage Run

401

Target run get error

get/v0/stageruns/{stage_run_id}/targetruns
Request samples
Response samples
application/json
{
  • "code": 0,
  • "message": "string",
  • "content": {
    }
}

Create a Target Runs for Stage Run

SecuritySCAPIAuthToken
Request
path Parameters
stage_run_id
required
string

Stage run Id

Request Body schema: application/json
required
target_id
required
string <uuid>
device_name
string
device_alias
string
Responses
200

Created Target Runs

401

Target Run create error

post/v0/stageruns/{stage_run_id}/targetruns
Request samples
application/json
{
  • "target_id": "d3bcdc92-4191-401b-ad0c-42056c6efab9",
  • "device_name": "string",
  • "device_alias": "string"
}
Response samples
application/json
{
  • "code": 0,
  • "message": "string",
  • "content": [
    ]
}

Get Target Run by Target Run ID

SecuritySCAPIAuthToken
Request
path Parameters
stage_run_id
required
string

Stage run Id

target_run_id
required
string

Id of the Target Run

Responses
200

Get target run

401

Operation get error

get/v0/stageruns/{stage_run_id}/targetruns/{target_run_id}
Request samples
Response samples
application/json
{
  • "code": 0,
  • "message": "string",
  • "content": {
    }
}

Update a Target Run

SecuritySCAPIAuthToken
Request
path Parameters
stage_run_id
required
string

Stage run Id

target_run_id
required
string

Id of the target run

Request Body schema: application/json
required
status
string
Enum: "pending" "queued" "processing" "dispatched" "running" "complete" "success" "failure" "cancelled" "invalid"
device_name
string
Responses
200

Updated Target Run run information

400

Target Run update error

401

Target Run update error

put/v0/stageruns/{stage_run_id}/targetruns/{target_run_id}
Request samples
application/json
{
  • "status": "pending",
  • "device_name": "string"
}
Response samples
application/json
{
  • "code": 0,
  • "message": "string",
  • "content": {
    }
}

Get status of the command running for Target run

SecuritySCAPIAuthToken
Request
path Parameters
stage_run_id
required
string

ID of the stage run

target_run_id
required
string

Id of the target run

Responses
200

Command processor request status

401

Command request create error

get/v0/stageruns/{stage_run_id}/targetruns/{target_run_id}/command
Request samples
Response samples
application/json
{
  • "code": 0,
  • "message": "string",
  • "content": {
    }
}

Create an command processor request for Target Run

SecuritySCAPIAuthToken
Request
path Parameters
stage_run_id
required
string

ID of the stage run

target_run_id
required
string

Id of the target run

Request Body schema: application/json
required
object (AndroidCommandRequest)
Responses
200

Created command processor request

401

Command request create error

post/v0/stageruns/{stage_run_id}/targetruns/{target_run_id}/command
Request samples
application/json
{ }
Response samples
application/json
{
  • "code": 0,
  • "message": "string",
  • "content": {
    }
}

Update target run command information.

SecuritySCAPIAuthToken
Request
path Parameters
stage_run_id
required
string

ID of the stage run

target_run_id
required
string

Id of the target run

command_id
required
string

Id of the command

Request Body schema: application/json
required
request_status
string
Value: "cancelled"
Responses
200

Command processor request status

400

Target run command update error

put/v0/stageruns/{stage_run_id}/targetruns/{target_run_id}/command/{command_id}
Request samples
application/json
{
  • "request_status": "cancelled"
}
Response samples
application/json
{
  • "code": 0,
  • "message": "string",
  • "content": {
    }
}