Travis CI API Docs

Build

An individual build.

Attributes

Minimal Representation

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

NameTypeDescription
idIntegerValue uniquely identifying the build.
numberStringIncremental number for a repository's builds.
stateStringCurrent state of the build.
durationIntegerWall clock time in seconds.
event_typeStringEvent that triggered the build.
previous_stateStringState of the previous build (useful to see if state changed).
pull_request_titleStringTitle of the build's pull request.
pull_request_numberIntegerNumber of the build's pull request.
started_atStringWhen the build started.
finished_atStringWhen the build finished.
privateBooleanWhether or not the build is private.
priorityUnknownThe build's priority.

Standard Representation

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

NameTypeDescription
idIntegerValue uniquely identifying the build.
numberStringIncremental number for a repository's builds.
stateStringCurrent state of the build.
durationIntegerWall clock time in seconds.
event_typeStringEvent that triggered the build.
previous_stateStringState of the previous build (useful to see if state changed).
pull_request_titleStringTitle of the build's pull request.
pull_request_numberIntegerNumber of the build's pull request.
started_atStringWhen the build started.
finished_atStringWhen the build finished.
privateBooleanWhether or not the build is private.
priorityUnknownThe build's priority.
repositoryRepositoryGitHub user or organization the build belongs to.
branchBranchThe branch the build is associated with.
tagStringThe build's tag.
commitCommitThe commit the build is associated with.
jobsJobsList of jobs that are part of the build's matrix.
stages[Stage]The stages of the build.
created_byOwnerThe User or Organization that created the build.
updated_atStringThe last time the build was updated.

Actions

Find

This returns a single build.

GET
/build/{build.id}
Template VariableTypeDescription
build.idIntegerValue uniquely identifying the build.
Query ParameterTypeDescription
include[String]List of attributes to eager load.

Example:GET /build/86601346

Cancel

This cancels a currently running build. It will set the build and associated jobs to "state": "canceled".

POST
/build/{build.id}/cancel
Template VariableTypeDescription
build.idIntegerValue uniquely identifying the build.

Example:POST /build/86601346/cancel

Restart

This restarts a build that has completed or been canceled.

POST
/build/{build.id}/restart
Template VariableTypeDescription
build.idIntegerValue uniquely identifying the build.

Example:POST /build/86601346/restart

Priority

Document resources/build/actions/priority not found.

POST
/build/{build.id}/priority
Template VariableTypeDescription
build.idIntegerValue uniquely identifying the build.
Accepted ParameterTypeDescription
build.cancel_allUnknownDocumentation missing.

Example:POST /build/86601346/priority