Env var
An individual environment variable.
If querying using the repository slug, it must be formatted using standard URL encoding, including any special characters.
Attributes
Standard Representation
Included when the resource is the main response of a request, or is eager loaded.
Name | Type | Description |
---|---|---|
id | String | The environment variable id. |
name | String | The environment variable name, e.g. FOO. |
value | String | The environment variable's value, e.g. bar. |
public | Boolean | Whether this environment variable should be publicly visible or not. |
branch | Unknown | The env_var's branch. |
Minimal Representation
Included when the resource is returned as part of another resource.
Name | Type | Description |
---|---|---|
id | String | The environment variable id. |
name | String | The environment variable name, e.g. FOO. |
public | Boolean | Whether this environment variable should be publicly visible or not. |
branch | Unknown | The env_var's branch. |
Actions
Find
This returns a single environment variable. It is possible to use the repository id or slug in the request.
GET
/repo/{provider}/{repository.id}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
env_var.id | String | The environment variable id. |
Query Parameter | Type | Description |
---|---|---|
env_var.id | String | The environment variable id. |
id | String | Alias for env_var.id. |
id | String | Alias for env_var.id. |
include | [String] | List of attributes to eager load. |
repository.id | Integer | Value uniquely identifying the repository. |
GET
/repo/{provider}/{repository.slug}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
env_var.id | String | The environment variable id. |
Query Parameter | Type | Description |
---|---|---|
env_var.id | String | The environment variable id. |
id | String | Alias for env_var.id. |
id | String | Alias for env_var.id. |
include | [String] | List of attributes to eager load. |
repository.id | Integer | Value uniquely identifying the repository. |
GET
/repo/{repository.id}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
env_var.id | String | The environment variable id. |
Query Parameter | Type | Description |
---|---|---|
env_var.id | String | The environment variable id. |
id | String | Alias for env_var.id. |
id | String | Alias for env_var.id. |
include | [String] | List of attributes to eager load. |
repository.id | Integer | Value uniquely identifying the repository. |
GET
/repo/{repository.slug}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
env_var.id | String | The environment variable id. |
Query Parameter | Type | Description |
---|---|---|
env_var.id | String | The environment variable id. |
id | String | Alias for env_var.id. |
id | String | Alias for env_var.id. |
include | [String] | List of attributes to eager load. |
repository.id | Integer | Value uniquely identifying the repository. |
Update
This updates a single environment variable. 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 variable:
curl -X PATCH \ -H "Content-Type: application/json" \ -H "Travis-API-Version: 3" \ -H "Authorization: token xxxxxxxxxxxx" \ -d '{ "env_var.value": "bar", "env_var.public": false }' \ https://api.travis-ci.com/repo/1234/env_var/{env_var.id}
PATCH
/repo/{provider}/{repository.id}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
env_var.id | String | The environment variable id. |
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. |
PATCH
/repo/{provider}/{repository.slug}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
env_var.id | String | The environment variable id. |
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. |
PATCH
/repo/{repository.id}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
env_var.id | String | The environment variable id. |
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. |
PATCH
/repo/{repository.slug}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
env_var.id | String | The environment variable id. |
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. |
Delete
This deletes a single environment variable. It is possible to use the repository id or slug in the request.
DELETE
/repo/{provider}/{repository.id}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
env_var.id | String | The environment variable id. |
DELETE
/repo/{provider}/{repository.slug}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
env_var.id | String | The environment variable id. |
DELETE
/repo/{repository.id}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
env_var.id | String | The environment variable id. |
DELETE
/repo/{repository.slug}/env_var/{env_var.id}
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
env_var.id | String | The environment variable id. |