Travis CI API Docs

Job

An individual job.

Attributes

Minimal Representation

Included when the resource is returned as part of another resource.

NameTypeDescription
idIntegerValue uniquely identifying the job.

Standard Representation

Included when the resource is the main response of a request, or is eager loaded.

NameTypeDescription
idIntegerValue uniquely identifying the job.
allow_failureUnknownThe job's allow_failure.
numberStringIncremental number for a repository's builds.
stateStringCurrent state of the job.
started_atStringWhen the job started.
finished_atStringWhen the job finished.
buildBuildThe build the job is associated with.
queueStringWorker queue this job is/was scheduled on.
repositoryRepositoryGitHub user or organization the job belongs to.
commitCommitThe commit the job is associated with.
ownerOwnerGitHub user or organization the job belongs to.
stage[Stage]The stages of the job.
created_atStringWhen the job was created.
updated_atStringWhen the job was updated.
privateBooleanWhether or not the job is private.
restarted_atUnknownThe job's restarted_at.
restarted_byUnknownThe job's restarted_by.

Actions

Find

This returns a single job.

GET
/job/{job.id}
Template VariableTypeDescription
job.idIntegerValue uniquely identifying the job.
Query ParameterTypeDescription
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 VariableTypeDescription
job.idIntegerValue 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 VariableTypeDescription
job.idIntegerValue 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 VariableTypeDescription
job.idIntegerValue uniquely identifying the job.

Example:POST /job/86601347/debug