Caches
A list of caches.
If querying using the repository slug, it must be formatted using standard URL encoding, including any special characters.
Attributes
Name | Type | Description |
---|---|---|
branch | String | The branch the cache belongs to. |
match | String | The string to match against the cache name. |
Actions
Find
This returns all the caches for a repository.
It's possible to filter by branch or by regexp match of a string to the cache name.
curl \ -H "Content-Type: application/json" \ -H "Travis-API-Version: 3" \ -H "Authorization: token xxxxxxxxxxxx" \ https://api.travis-ci.com/repo/1234/caches?branch=master
curl \ -H "Content-Type: application/json" \ -H "Travis-API-Version: 3" \ -H "Authorization: token xxxxxxxxxxxx" \ https://api.travis-ci.com/repo/1234/caches?match=linux
GET
/repo/{provider}/{repository.id}/caches
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
Query Parameter | Type | Description |
---|---|---|
branch | [String] | Alias for caches.branch. |
caches.branch | [String] | Filters caches by the branch the cache belongs to. |
caches.match | [String] | Filters caches by the string to match against the cache name. |
include | [String] | List of attributes to eager load. |
match | [String] | Alias for caches.match. |
GET
/repo/{provider}/{repository.slug}/caches
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Query Parameter | Type | Description |
---|---|---|
branch | [String] | Alias for caches.branch. |
caches.branch | [String] | Filters caches by the branch the cache belongs to. |
caches.match | [String] | Filters caches by the string to match against the cache name. |
include | [String] | List of attributes to eager load. |
match | [String] | Alias for caches.match. |
GET
/repo/{repository.id}/caches
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
Query Parameter | Type | Description |
---|---|---|
branch | [String] | Alias for caches.branch. |
caches.branch | [String] | Filters caches by the branch the cache belongs to. |
caches.match | [String] | Filters caches by the string to match against the cache name. |
include | [String] | List of attributes to eager load. |
match | [String] | Alias for caches.match. |
Example:GET /repo/891/caches
GET
/repo/{repository.slug}/caches
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Query Parameter | Type | Description |
---|---|---|
branch | [String] | Alias for caches.branch. |
caches.branch | [String] | Filters caches by the branch the cache belongs to. |
caches.match | [String] | Filters caches by the string to match against the cache name. |
include | [String] | List of attributes to eager load. |
match | [String] | Alias for caches.match. |
Example:GET /repo/rails%2Frails/caches
Delete
This deletes all caches for a repository.
As with find
it's possible to delete by branch or by regexp match of a string to the cache name.
curl -X DELETE \ -H "Content-Type: application/json" \ -H "Travis-API-Version: 3" \ -H "Authorization: token xxxxxxxxxxxx" \ https://api.travis-ci.com/repo/1234/caches?branch=master
DELETE
/repo/{provider}/{repository.id}/caches
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
DELETE
/repo/{provider}/{repository.slug}/caches
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
DELETE
/repo/{repository.id}/caches
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
Example:DELETE /repo/891/caches
DELETE
/repo/{repository.slug}/caches
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Example:DELETE /repo/rails%2Frails/caches