Menu
AWS IoT
Developer Guide

ListJobs

Lists jobs.

Request syntax:

GET /jobs?status=status&targetSelection=targetSelection&maxResults=maxResults&nextToken=nextToken&thingGroupName=thingGroupName&thingGroupId=thingGroupId

URI Request Parameters:

Name

Type

Req?

Description

status

JobStatus

no

An optional filter that lets you search for jobs that have the specified status.

targetSelection

TargetSelection

no

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

maxResults

LaserMaxResults

no

The maximum number of results to return per request.

nextToken

NextToken

no

The token to retrieve the next set of results.

thingGroupName

ThingGroupName

no

A filter that limits the returned jobs to those for the specified group.

thingGroupId

ThingGroupId

no

A filter that limits the returned jobs to those for the specified group.

Response syntax:

Content-type: application/json { "jobs": [ { "jobArn": "string", "jobId": "string", "thingGroupId": "string", "targetSelection": "string", "status": "string", "createdAt": "timestamp", "lastUpdatedAt": "timestamp", "completedAt": "timestamp" } ], "nextToken": "string" }

Response Body Parameters:

Name

Type

Req?

Description

jobs

JobSummaryList

no

A list of jobs.

nextToken

NextToken

no

The token for the next set of results, or null if there are no additional results.

Errors:

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

HTTP response code: 400

ResourceNotFoundException

The specified resource does not exist.

HTTP response code: 404

ThrottlingException

The rate exceeds the limit.

HTTP response code: 429

ServiceUnavailableException

The service is temporarily unavailable.

HTTP response code: 503

CLI

Synopsis:

aws iot list-jobs \ [--status <value>] \ [--target-selection <value>] \ [--max-results <value>] \ [--next-token <value>] \ [--thing-group-name <value>] \ [--thing-group-id <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "status": "string", "targetSelection": "string", "maxResults": "integer", "nextToken": "string", "thingGroupName": "string", "thingGroupId": "string" }

cli-input-json fields:

Name

Type

Description

status

string

enum: IN_PROGRESS | CANCELED | COMPLETED

java class: ccom.amazonaws.iot.laser.common.JobStatus

An optional filter that lets you search for jobs that have the specified status.

targetSelection

string

enum: CONTINUOUS | SNAPSHOT

java class: com.amazonaws.iot.laser.TargetSelection

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

maxResults

integer

java class: java.lang.Integer

range- max:250 min:1

The maximum number of results to return per request.

nextToken

string

The token to retrieve the next set of results.

thingGroupName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

A filter that limits the returned jobs to those for the specified group.

thingGroupId

string

length max:128 min:1

pattern: [a-zA-Z0-9-]+

A filter that limits the returned jobs to those for the specified group.

Output:

{ "jobs": [ { "jobArn": "string", "jobId": "string", "thingGroupId": "string", "targetSelection": "string", "status": "string", "createdAt": "timestamp", "lastUpdatedAt": "timestamp", "completedAt": "timestamp" } ], "nextToken": "string" }

cli output fields:

Name

Type

Description

jobs

list

member: JobSummary

java class: java.util.List

A list of jobs.

JobSummary

JobSummary

jobArn

string

The job ARN.

jobId

string

length max:64 min:1

pattern: [a-zA-Z0-9_-]+

The unique identifier you assigned to this job when it was created.

thingGroupId

string

length max:128 min:1

pattern: [a-zA-Z0-9-]+

The ID of the thing group.

targetSelection

string

enum: CONTINUOUS | SNAPSHOT

java class: com.amazonaws.iot.laser.TargetSelection

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

status

string

enum: IN_PROGRESS | CANCELED | COMPLETED

java class: ccom.amazonaws.iot.laser.common.JobStatus

The job summary status.

createdAt

timestamp

The time, in milliseconds since the epoch, when the job was created.

lastUpdatedAt

timestamp

The time, in milliseconds since the epoch, when the job was last updated.

completedAt

timestamp

The time, in milliseconds since the epoch, when the job completed.

nextToken

string

The token for the next set of results, or null if there are no additional results.

On this page: