Description: Update an environment variable using Id.
Security: Requires a valid user
Usage: PUT api/v1/environmentVariables/:id
Consumes: application/json
URL Parameters:
Parameter | Type | Description | Required/Optional |
---|---|---|---|
| Integer | Environment variable id. | Required |
Query String Parameters: Ignored
Request Parameters:
Parameter | Type | Description | Required/Optional |
---|---|---|---|
| String | Environment variable key. | Required |
| String | Environment variable value. | Required |
| String | Scope of the environment variable. It can be either 'global' or 'project'. Default value is | Optional |
| Integer | Id of the Project. | Required if scope is set as 'project'. |
| Boolean | Sets the precedence for the environment variable. When set as Default value is | Optional |
Produces: application/json
Sample Request:
curl -L -X POST 'https://icarus.jfrogdev.org/pipelines/api/v1/environmentVariables/4' \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{ key: hello, value: world, scope: global, projectId: 2 isReadOnly: true }'
Sample Response:
{ Id: 4, key: hello, value: world, scope: global, projectId: 2 isReadOnly: true }
Response Codes:
200: Success