Users may add a public/private RSA key pair to a repository.
This can be used within builds, for example to access third-party services or deploy code to production.
Please note this feature is only available on the travis-ci.com domain.
Included when the resource is the main response of a request, or is eager loaded.
Name | Type | Description |
---|
description | String | A text description. |
public_key | String | The public key. |
fingerprint | String | The fingerprint. |
Included when the resource is returned as part of another resource.
Name | Type | Description |
---|
description | String | A text description. |
public_key | String | The public key. |
fingerprint | String | The fingerprint. |
Return the current key pair, if it exists.
GET
/repo/{provider}/{repository.id}/key_pair
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. |
GET
/repo/{provider}/{repository.slug}/key_pair
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. |
GET
/repo/{repository.id}/key_pair
Template Variable | Type | Description |
---|
repository.id | Integer | Value uniquely identifying the repository. |
Query Parameter | Type | Description |
---|
include | [String] | List of attributes to eager load. |
Example:GET /repo/891/key_pair
GET
/repo/{repository.slug}/key_pair
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. |
Example:GET /repo/rails%2Frails/key_pair
Creates a new key pair.
curl -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token xxxxxxxxxxxx" \
-d '{ "key_pair.description": "FooBar", "key_pair.value": "xxxxx"}' \
https://api.travis-ci.com/repo/1234/key_pair
POST
/repo/{provider}/{repository.id}/key_pair
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
Accepted Parameter | Type | Description |
---|
key_pair.description | String | A text description. |
key_pair.value | String | The private key. |
POST
/repo/{provider}/{repository.slug}/key_pair
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Accepted Parameter | Type | Description |
---|
key_pair.description | String | A text description. |
key_pair.value | String | The private key. |
POST
/repo/{repository.id}/key_pair
Template Variable | Type | Description |
---|
repository.id | Integer | Value uniquely identifying the repository. |
Accepted Parameter | Type | Description |
---|
key_pair.description | String | A text description. |
key_pair.value | String | The private key. |
Example:POST /repo/891/key_pair
POST
/repo/{repository.slug}/key_pair
Template Variable | Type | Description |
---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Accepted Parameter | Type | Description |
---|
key_pair.description | String | A text description. |
key_pair.value | String | The private key. |
Example:POST /repo/rails%2Frails/key_pair
Update the key pair.
curl -X PATCH \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token xxxxxxxxxxxx" \
-d '{ "key_pair.description": "FooBarBaz" }' \
https://api.travis-ci.com/repo/1234/key_pair
PATCH
/repo/{provider}/{repository.id}/key_pair
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
Accepted Parameter | Type | Description |
---|
key_pair.description | String | A text description. |
key_pair.value | String | The private key. |
PATCH
/repo/{provider}/{repository.slug}/key_pair
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Accepted Parameter | Type | Description |
---|
key_pair.description | String | A text description. |
key_pair.value | String | The private key. |
PATCH
/repo/{repository.id}/key_pair
Template Variable | Type | Description |
---|
repository.id | Integer | Value uniquely identifying the repository. |
Accepted Parameter | Type | Description |
---|
key_pair.description | String | A text description. |
key_pair.value | String | The private key. |
Example:PATCH /repo/891/key_pair
PATCH
/repo/{repository.slug}/key_pair
Template Variable | Type | Description |
---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Accepted Parameter | Type | Description |
---|
key_pair.description | String | A text description. |
key_pair.value | String | The private key. |
Example:PATCH /repo/rails%2Frails/key_pair
Delete the key pair.
DELETE
/repo/{provider}/{repository.id}/key_pair
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
DELETE
/repo/{provider}/{repository.slug}/key_pair
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
DELETE
/repo/{repository.id}/key_pair
Template Variable | Type | Description |
---|
repository.id | Integer | Value uniquely identifying the repository. |
Example:DELETE /repo/891/key_pair
DELETE
/repo/{repository.slug}/key_pair
Template Variable | Type | Description |
---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Example:DELETE /repo/rails%2Frails/key_pair