Requests
A list of requests.
If querying using the repository slug, it must be formatted using standard URL encoding, including any special characters.
Attributes
Name | Type | Description |
---|---|---|
requests | [Request] | List of requests. |
Collection Items
Each entry in the requests array has the following attributes:
Name | Type | Description |
---|---|---|
id | Integer | Value uniquely identifying the request. |
state | String | The state of a request (eg. whether it has been processed or not). |
result | String | The result of the request (eg. rejected or approved). |
message | String | Travis-ci status message attached to the request. |
pull_request_mergeable | Unknown | The request's pull_request_mergeable. |
repository | Repository | GitHub user or organization the request belongs to. |
branch_name | String | Name of the branch requested to be built. |
commit | Commit | The commit the request is associated with. |
builds | [Build] | The request's builds. |
owner | Owner | GitHub user or organization the request belongs to. |
created_at | String | When Travis CI created the request. |
event_type | String | Origin of request (push, pull request, api). |
base_commit | String | The base commit the request is associated with. |
head_commit | String | The head commit the request is associated with. |
messages | Unknown | The request's messages. |
config | Object | Build configuration (as parsed from .travis.yml). |
raw_configs | Unknown | The request's raw_configs. |
yaml_config | Unknown | The request's yaml_config. |
Actions
Find
This will return a list of requests belonging to a repository.
GET
/repo/{provider}/{repository.id}/requests
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
limit | Integer | How many requests to include in the response. Used for pagination. |
offset | Integer | How many requests to skip before the first entry in the response. Used for pagination. |
GET
/repo/{provider}/{repository.slug}/requests
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
limit | Integer | How many requests to include in the response. Used for pagination. |
offset | Integer | How many requests to skip before the first entry in the response. Used for pagination. |
GET
/repo/{repository.id}/requests
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
limit | Integer | How many requests to include in the response. Used for pagination. |
offset | Integer | How many requests to skip before the first entry in the response. Used for pagination. |
Example:GET /repo/891/requests?limit=5
GET
/repo/{repository.slug}/requests
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
limit | Integer | How many requests to include in the response. Used for pagination. |
offset | Integer | How many requests to skip before the first entry in the response. Used for pagination. |
Example:GET /repo/rails%2Frails/requests?limit=5
Create
This will create a request for an individual repository, triggering a build to run on Travis CI.
Use namespaced params in JSON format in the request body to pass any accepted parameters. Any keys in the request's config will override keys existing in the .travis.yml
.
curl -X POST \ -H "Content-Type: application/json" \ -H "Travis-API-Version: 3" \ -H "Authorization: token xxxxxxxxxxxx" \ -d '{ "request": { "message": "Override the commit message: this is an api request", "branch": "master" }}'\ https://api.travis-ci.com/repo/1/requests
The response includes the following body:
{ "": "pending", "remaining_requests": 1, "repository": { "": "repository", "": "/repo/1", "": "minimal", "id": 1, "name": "test", "slug": "owner/repo" }, "request": { "repository": { "id": 1, "owner_name": "owner", "name": "repo" }, "user": { "id": 1 }, "id": 1, "message": "Override the commit message: this is an api request", "branch": "master", "config": { } }, "resource_type": "request" }
POST
/repo/{provider}/{repository.id}/requests
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
Accepted Parameter | Type | Description |
---|---|---|
request.merge_mode | Unknown | Documentation missing. |
request.config | Object | Build configuration (as parsed from .travis.yml). |
request.configs | Unknown | Documentation missing. |
request.message | String | Travis-ci status message attached to the request. |
request.branch | String | Branch requested to be built. |
request.sha | Unknown | Documentation missing. |
request.token | Object | Travis token associated with webhook on GitHub (DEPRECATED). |
POST
/repo/{provider}/{repository.slug}/requests
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Accepted Parameter | Type | Description |
---|---|---|
request.merge_mode | Unknown | Documentation missing. |
request.config | Object | Build configuration (as parsed from .travis.yml). |
request.configs | Unknown | Documentation missing. |
request.message | String | Travis-ci status message attached to the request. |
request.branch | String | Branch requested to be built. |
request.sha | Unknown | Documentation missing. |
request.token | Object | Travis token associated with webhook on GitHub (DEPRECATED). |
POST
/repo/{repository.id}/requests
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
Accepted Parameter | Type | Description |
---|---|---|
request.merge_mode | Unknown | Documentation missing. |
request.config | Object | Build configuration (as parsed from .travis.yml). |
request.configs | Unknown | Documentation missing. |
request.message | String | Travis-ci status message attached to the request. |
request.branch | String | Branch requested to be built. |
request.sha | Unknown | Documentation missing. |
request.token | Object | Travis token associated with webhook on GitHub (DEPRECATED). |
Example:POST /repo/891/requests
POST
/repo/{repository.slug}/requests
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Accepted Parameter | Type | Description |
---|---|---|
request.merge_mode | Unknown | Documentation missing. |
request.config | Object | Build configuration (as parsed from .travis.yml). |
request.configs | Unknown | Documentation missing. |
request.message | String | Travis-ci status message attached to the request. |
request.branch | String | Branch requested to be built. |
request.sha | Unknown | Documentation missing. |
request.token | Object | Travis token associated with webhook on GitHub (DEPRECATED). |
Example:POST /repo/rails%2Frails/requests