Job
An individual job.
Attributes
Minimal Representation
Included when the resource is returned as part of another resource.
Name | Type | Description |
---|---|---|
id | Integer | Value uniquely identifying the job. |
Standard Representation
Included when the resource is the main response of a request, or is eager loaded.
Name | Type | Description |
---|---|---|
id | Integer | Value uniquely identifying the job. |
allow_failure | Unknown | The job's allow_failure. |
number | String | Incremental number for a repository's builds. |
state | String | Current state of the job. |
started_at | String | When the job started. |
finished_at | String | When the job finished. |
build | Build | The build the job is associated with. |
queue | String | Worker queue this job is/was scheduled on. |
repository | Repository | GitHub user or organization the job belongs to. |
commit | Commit | The commit the job is associated with. |
owner | Owner | GitHub user or organization the job belongs to. |
stage | [Stage] | The stages of the job. |
created_at | String | When the job was created. |
updated_at | String | When the job was updated. |
private | Boolean | Whether or not the job is private. |
restarted_at | Unknown | The job's restarted_at. |
restarted_by | Unknown | The job's restarted_by. |
vm_size | Unknown | The job's vm_size. |
Actions
Find
This returns a single job.
GET
/job/{job.id}
Template Variable | Type | Description |
---|---|---|
job.id | Integer | Value uniquely identifying the job. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
Example:GET /job/86601347
Cancel
This cancels a currently running job.
POST
/job/{job.id}/cancel
Template Variable | Type | Description |
---|---|---|
job.id | Integer | Value uniquely identifying the job. |
Example:POST /job/86601347/cancel
Restart
This restarts a job that has completed or been canceled.
POST
/job/{job.id}/restart
Template Variable | Type | Description |
---|---|---|
job.id | Integer | Value uniquely identifying the job. |
Example:POST /job/86601347/restart
Debug
This restarts a job in debug mode, enabling the logged-in user to ssh into the build VM. Please note this feature is only available on the travis-ci.com domain, and those repositories on the travis-ci.org domain for which the debug feature is enabled. See this document for more details.
POST
/job/{job.id}/debug
Template Variable | Type | Description |
---|---|---|
job.id | Integer | Value uniquely identifying the job. |
Example:POST /job/86601347/debug