Create Agent Variable

Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration.

Authentication

AuthorizationToken

Use Authorization: Token <API_KEY> Example: Authorization: Token 12345abcdef

Path parameters

project_idstringRequired

Request

Agent variable details
keystringRequired

The variable name, following the DG_<VARIABLE_NAME> format

valueanyRequired

The value to substitute. Can be any valid JSON type (string, number, boolean, object, or array)

api_versionintegerOptionalDefaults to 1
API version. Defaults to 1

Response

Agent variable created successfully
variable_idstring
The unique identifier of the variable
keystring

The variable name, following the DG_<VARIABLE_NAME> format

valueany
The value to substitute. Can be any valid JSON type
created_atstringformat: "date-time"
Timestamp when the variable was created
updated_atstringformat: "date-time"
Timestamp when the variable was last updated

Errors

400
Bad Request Error