Env vars
A list of environment variables.
If querying using the repository slug, it must be formatted using standard URL encoding, including any special characters.
Attributes
Name | Type | Description |
---|---|---|
env_vars | [Env var] | List of env_vars. |
Actions
For Repository
This returns a list of environment variables for an individual repository. It is possible to use the repository id or slug in the request.
GET
/repo/{provider}/{repository.id}/env_vars
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}/env_vars
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}/env_vars
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/env_vars
GET
/repo/{repository.slug}/env_vars
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/env_vars
Create
This creates an environment variable for an individual repository. It is possible to use the repository id or slug in the request.
Use namespaced params in the request body to pass the new environment variables:
curl -X POST \ -H "Content-Type: application/json" \ -H "Travis-API-Version: 3" \ -H "Authorization: token xxxxxxxxxxxx" \ -d '{ "env_var.name": "FOO", "env_var.value": "bar", "env_var.public": false }' \ https://api.travis-ci.com/repo/1234/env_vars
POST
/repo/{provider}/{repository.id}/env_vars
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
Accepted Parameter | Type | Description |
---|---|---|
env_var.name | String | The environment variable name, e.g. FOO. |
env_var.value | String | The environment variable's value, e.g. bar. |
env_var.public | Boolean | Whether this environment variable should be publicly visible or not. |
env_var.branch | Unknown | The env_var's branch. |
POST
/repo/{provider}/{repository.slug}/env_vars
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Accepted Parameter | Type | Description |
---|---|---|
env_var.name | String | The environment variable name, e.g. FOO. |
env_var.value | String | The environment variable's value, e.g. bar. |
env_var.public | Boolean | Whether this environment variable should be publicly visible or not. |
env_var.branch | Unknown | The env_var's branch. |
POST
/repo/{repository.id}/env_vars
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
Accepted Parameter | Type | Description |
---|---|---|
env_var.name | String | The environment variable name, e.g. FOO. |
env_var.value | String | The environment variable's value, e.g. bar. |
env_var.public | Boolean | Whether this environment variable should be publicly visible or not. |
env_var.branch | Unknown | The env_var's branch. |
Example:POST /repo/891/env_vars
POST
/repo/{repository.slug}/env_vars
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Accepted Parameter | Type | Description |
---|---|---|
env_var.name | String | The environment variable name, e.g. FOO. |
env_var.value | String | The environment variable's value, e.g. bar. |
env_var.public | Boolean | Whether this environment variable should be publicly visible or not. |
env_var.branch | Unknown | The env_var's branch. |
Example:POST /repo/rails%2Frails/env_vars