Actors/Actor versions

Update environment variable in Actor version (POST)

Changed on

Updates Actor environment variable using values specified by an EnvVar object passed as JSON in the POST payload. This endpoint is an alias for the Update environment variable in Actor version endpoint and behaves identically.

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

Request

  • Base URL
    https://api.apify.com
  • Auth
    • HTTP bearer
    • or API key in query parameter token

Path parameters

actorIdstring required
Example:compass~google-maps-extractor

Actor ID or the username of the Actor owner and the Actor name, separated by a tilde (~).

versionNumberstring required
Example:0.1

Actor version.

envVarNamestring required
Example:MY_ENV_VAR

The name of the environment variable

Request body

namestring required

The name of the environment variable. Can't contain =.

valuestring required

The value of the environment variable.

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",
    "valueHash": "a1b2c3"
  }
}

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status