Travis CI API Docs

Builds

A list of builds.

If querying using the repository slug, it must be formatted using standard URL encoding, including any special characters.

Attributes

NameTypeDescription
builds[Build]List of builds.

Collection Items

Each entry in the builds array has the following attributes:

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.
requestUnknownThe build's request.
log_completeUnknownThe build's log_complete.

Actions

For Current User

This returns a list of builds for the current user. The result is paginated. The default limit is 100.

GET
/builds
Query ParameterTypeDescription
include[String]List of attributes to eager load.
limitIntegerHow many builds to include in the response. Used for pagination.
limitIntegerHow many builds to include in the response. Used for pagination.
offsetIntegerHow many builds to skip before the first entry in the response. Used for pagination.
offsetIntegerHow many builds to skip before the first entry in the response. Used for pagination.
sort_by[String]Attributes to sort builds by. Used for pagination.
sort_by[String]Attributes to sort builds by. Used for pagination.

Example:GET /builds?limit=5

Sortable by: id, created_at, started_at, finished_at, number, append :desc to any attribute to reverse order.
The default value is number:desc,id:desc.

Find

This returns a list of builds for an individual repository. It is possible to use the repository id or slug in the request. The result is paginated. Each request will return 25 results.

GET
/repo/{provider}/{repository.id}/builds
Template VariableTypeDescription
providerUnknownDocumentation missing.
repository.idIntegerValue uniquely identifying the repository.
Query ParameterTypeDescription
branch.name[String]Filters builds by name of the git branch.
build.created_by[Owner]Filters builds by the User or Organization that created the build.
build.event_type[String]Filters builds by event that triggered the build.
build.previous_state[String]Filters builds by state of the previous build (useful to see if state changed).
build.state[String]Filters builds by current state of the build.
created_by[Owner]Alias for build.created_by.
event_type[String]Alias for build.event_type.
include[String]List of attributes to eager load.
limitIntegerHow many builds to include in the response. Used for pagination.
offsetIntegerHow many builds to skip before the first entry in the response. Used for pagination.
previous_state[String]Alias for build.previous_state.
sort_by[String]Attributes to sort builds by. Used for pagination.
state[String]Alias for build.state.

Sortable by: id, created_at, started_at, finished_at, number, append :desc to any attribute to reverse order.
The default value is number:desc,id:desc.

GET
/repo/{provider}/{repository.slug}/builds
Template VariableTypeDescription
providerUnknownDocumentation missing.
repository.slugStringSame as {repository.owner.name}/{repository.name}.
Query ParameterTypeDescription
branch.name[String]Filters builds by name of the git branch.
build.created_by[Owner]Filters builds by the User or Organization that created the build.
build.event_type[String]Filters builds by event that triggered the build.
build.previous_state[String]Filters builds by state of the previous build (useful to see if state changed).
build.state[String]Filters builds by current state of the build.
created_by[Owner]Alias for build.created_by.
event_type[String]Alias for build.event_type.
include[String]List of attributes to eager load.
limitIntegerHow many builds to include in the response. Used for pagination.
offsetIntegerHow many builds to skip before the first entry in the response. Used for pagination.
previous_state[String]Alias for build.previous_state.
sort_by[String]Attributes to sort builds by. Used for pagination.
state[String]Alias for build.state.

Sortable by: id, created_at, started_at, finished_at, number, append :desc to any attribute to reverse order.
The default value is number:desc,id:desc.

GET
/repo/{repository.id}/builds
Template VariableTypeDescription
repository.idIntegerValue uniquely identifying the repository.
Query ParameterTypeDescription
branch.name[String]Filters builds by name of the git branch.
build.created_by[Owner]Filters builds by the User or Organization that created the build.
build.event_type[String]Filters builds by event that triggered the build.
build.previous_state[String]Filters builds by state of the previous build (useful to see if state changed).
build.state[String]Filters builds by current state of the build.
created_by[Owner]Alias for build.created_by.
event_type[String]Alias for build.event_type.
include[String]List of attributes to eager load.
limitIntegerHow many builds to include in the response. Used for pagination.
offsetIntegerHow many builds to skip before the first entry in the response. Used for pagination.
previous_state[String]Alias for build.previous_state.
sort_by[String]Attributes to sort builds by. Used for pagination.
state[String]Alias for build.state.

Example:GET /repo/891/builds?limit=5

Sortable by: id, created_at, started_at, finished_at, number, append :desc to any attribute to reverse order.
The default value is number:desc,id:desc.

GET
/repo/{repository.slug}/builds
Template VariableTypeDescription
repository.slugStringSame as {repository.owner.name}/{repository.name}.
Query ParameterTypeDescription
branch.name[String]Filters builds by name of the git branch.
build.created_by[Owner]Filters builds by the User or Organization that created the build.
build.event_type[String]Filters builds by event that triggered the build.
build.previous_state[String]Filters builds by state of the previous build (useful to see if state changed).
build.state[String]Filters builds by current state of the build.
created_by[Owner]Alias for build.created_by.
event_type[String]Alias for build.event_type.
include[String]List of attributes to eager load.
limitIntegerHow many builds to include in the response. Used for pagination.
offsetIntegerHow many builds to skip before the first entry in the response. Used for pagination.
previous_state[String]Alias for build.previous_state.
sort_by[String]Attributes to sort builds by. Used for pagination.
state[String]Alias for build.state.

Example:GET /repo/rails%2Frails/builds?limit=5

Sortable by: id, created_at, started_at, finished_at, number, append :desc to any attribute to reverse order.
The default value is number:desc,id:desc.