@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AWS IoT Jobs Data Plane
@version 2017-09-29
@auth AWS SigV4
@endpoints 4
@toc things(4)

@endpoint GET /things/{thingName}/jobs/{jobId}
@desc Gets details of a job execution.
@required {jobId: str, thingName: str}
@optional {includeJobDocument: bool, executionNumber: int(i64)}
@returns(200) {execution: JobExecution?{jobId: str?, thingName: str?, status: str?, statusDetails: map<str,str>?, queuedAt: int(i64)?, startedAt: int(i64)?, lastUpdatedAt: int(i64)?, approximateSecondsBeforeTimedOut: int(i64)?, versionNumber: int(i64)?, executionNumber: int(i64)?, jobDocument: str?}}

@endpoint GET /things/{thingName}/jobs
@desc Gets the list of all jobs for a thing that are not in a terminal status.
@required {thingName: str}
@returns(200) {inProgressJobs: [JobExecutionSummary]?, queuedJobs: [JobExecutionSummary]?}

@endpoint PUT /things/{thingName}/jobs/$next
@desc Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.
@required {thingName: str}
@optional {statusDetails: map<str,str>, stepTimeoutInMinutes: int(i64)}
@returns(200) {execution: JobExecution?{jobId: str?, thingName: str?, status: str?, statusDetails: map<str,str>?, queuedAt: int(i64)?, startedAt: int(i64)?, lastUpdatedAt: int(i64)?, approximateSecondsBeforeTimedOut: int(i64)?, versionNumber: int(i64)?, executionNumber: int(i64)?, jobDocument: str?}}

@endpoint POST /things/{thingName}/jobs/{jobId}
@desc Updates the status of a job execution.
@required {jobId: str, thingName: str, status: str}
@optional {statusDetails: map<str,str>, stepTimeoutInMinutes: int(i64), expectedVersion: int(i64), includeJobExecutionState: bool, includeJobDocument: bool, executionNumber: int(i64)}
@returns(200) {executionState: JobExecutionState?{status: str?, statusDetails: map<str,str>?, versionNumber: int(i64)?}, jobDocument: str?}

@end
