v3

OpenAPI 3.1.2Apache 2.02026-07-31231237972.0 KB
Actors/Actor versions

Create environment variable

Creates an environment variable of an Actor using values specified in a EnvVar object passed as JSON in the POST payload.

The request must specify name and value parameters (as strings) in the JSON payload and a Content-Type: application/json HTTP header.

{
    "name": "ENV_VAR_NAME",
    "value": "my-env-var"
}

The response is the EnvVar object as returned by the Get environment variable endpoint.

post/v2/actors/{actorId}/versions/{versionNumber}/env-vars

Path parameters

actorIdstring required
Example:janedoe~my-actor

Actor ID or a tilde-separated owner's username and Actor name.

versionNumberstring required
Example:0.1

Actor version.

Request body

namestring required

The name of the environment variable.

valuestring required

The value of the environment variable. If isSecret is true, this value isn't returned by the API.

isSecretboolean nullable

Whether the environment variable is encrypted. Secret values aren't returned by the API.

Example request

{
  "name": "MY_ENV_VAR",
  "value": "my-value"
}

Response

Example response

{
  "data": {
    "name": "MY_ENV_VAR",
    "value": "my-value"
  }
}