Skip to main content

Global Configurator -- Variables API

Global variables are key-value pairs that can be referenced across all automations. They provide a central place to store configuration values, environment-specific settings, and shared constants. Variables support encryption for sensitive values like API keys and tokens.

Base URL: http://localhost:8081

Prefix: /global-variable

Endpoints​

MethodPathDescriptionAuthority
POST/global-variable/upsertCreate or update a variableGlobalConfigurator:GlobalVariable:upsert
GET/global-variable/\{id\}Get variable by ID--
GET/global-variable/by-name/\{name\}Get variable by name--
GET/global-variable/\{name\}/existsCheck if variable name existsGlobalConfigurator:GlobalVariable:read
POST/global-variable/searchSearch variables with filtersGlobalConfigurator:GlobalVariable:read
GET/global-variable/allGet all variables (name and value)GlobalConfigurator:GlobalVariable:read
DELETE/global-variable/\{id\}Delete variable by IDGlobalConfigurator:GlobalVariable:delete
POST/global-variable/bulk-deleteDelete multiple variablesGlobalConfigurator:GlobalVariable:delete
POST/global-variable/decryptDecrypt an encrypted variableGlobalConfigurator:GlobalVariable:decrypt
GET/global-variable/optionsGet variable options for dropdownsGlobalConfigurator:GlobalVariable:read

POST /global-variable/upsert​

Create a new global variable or update an existing one. If the request body includes an id that matches an existing variable, it is updated.

Plain text variable​

{
"name": "DEFAULT_TIMEOUT_MS",
"description": "Default timeout for HTTP requests in milliseconds.",
"baseType": "string",
"subType": "text",
"value": "30000",
"isEncrypted": false
}

Encrypted variable (e.g., API key)​

{
"name": "THIRD_PARTY_API_KEY",
"description": "API key for the third-party analytics service.",
"baseType": "string",
"subType": "secret",
"value": "sk-abc123def456ghi789",
"isEncrypted": true
}

JSON variable​

{
"name": "EMAIL_DISTRIBUTION_LISTS",
"description": "Email distribution lists for automated reports.",
"baseType": "json",
"subType": "object",
"value": "{\"finance\": [\"cfo@example.com\", \"accounting@example.com\"], \"engineering\": [\"eng-leads@example.com\"]}",
"isEncrypted": false
}

Response:

{
"status": "Success",
"message": "Global variable saved successfully",
"data": {
"id": "gv-abc-123",
"name": "DEFAULT_TIMEOUT_MS",
"description": "Default timeout for HTTP requests in milliseconds.",
"baseType": "string",
"subType": "text",
"value": "30000",
"isEncrypted": false,
"createdAt": "2026-04-02T09:00:00Z",
"updatedAt": "2026-04-02T09:00:00Z"
}
}

For encrypted variables, the value field is stored encrypted and returned as an encrypted string in API responses.


GET /global-variable/{id}​

Get a variable by its unique ID.

Example:

curl http://localhost:8081/global-variable/gv-abc-123

Response:

{
"status": "Success",
"message": "Global variable fetched successfully",
"data": {
"id": "gv-abc-123",
"name": "DEFAULT_TIMEOUT_MS",
"description": "Default timeout for HTTP requests in milliseconds.",
"baseType": "string",
"subType": "text",
"value": "30000",
"isEncrypted": false,
"createdAt": "2026-04-02T09:00:00Z",
"updatedAt": "2026-04-02T09:00:00Z"
}
}

GET /global-variable/by-name/{name}​

Get a variable by its name.

Example:

curl http://localhost:8081/global-variable/by-name/DEFAULT_TIMEOUT_MS

Returns the same structure as GET /global-variable/\{id\}.


GET /global-variable/{name}/exists​

Check whether a variable with the given name already exists.

Example:

curl http://localhost:8081/global-variable/DEFAULT_TIMEOUT_MS/exists

Response:

{
"status": "Success",
"message": "Global variable presence check completed",
"data": true
}

POST /global-variable/search​

Search variables with pagination, sorting, and column-level filters.

Request body:

{
"page": 0,
"size": 10,
"sortBy": "name",
"sortOrder": "asc",
"searchText": "timeout",
"filters": {
"baseType": {
"operator": "and",
"constraints": [
{ "value": "string", "matchMode": "equals" }
]
}
}
}

Response:

{
"status": "Success",
"message": "Global variables fetched successfully",
"data": [
{
"id": "gv-abc-123",
"name": "DEFAULT_TIMEOUT_MS",
"baseType": "string",
"subType": "text",
"value": "30000",
"isEncrypted": false
}
],
"meta": {
"totalElements": 1,
"page": 0,
"size": 10
}
}

GET /global-variable/all​

Get all global variables, returning only name and value fields. Useful for resolving variable references during automation execution.

Example:

curl http://localhost:8081/global-variable/all

Response:

{
"status": "Success",
"message": "Global variables fetched successfully",
"data": [
{ "name": "DEFAULT_TIMEOUT_MS", "value": "30000" },
{ "name": "THIRD_PARTY_API_KEY", "value": "ENC(xyz...)" },
{ "name": "EMAIL_DISTRIBUTION_LISTS", "value": "{\"finance\": [...]}" }
]
}

DELETE /global-variable/{id}​

Delete a variable by its ID.

Example:

curl -X DELETE http://localhost:8081/global-variable/gv-abc-123

Response:

{
"status": "Success",
"message": "Global variable deleted successfully",
"data": null
}

POST /global-variable/bulk-delete​

Delete multiple variables at once.

Request body:

["gv-abc-123", "gv-def-456", "gv-ghi-789"]

Response:

{
"status": "Success",
"message": "Global variables deleted successfully",
"data": ["gv-abc-123", "gv-def-456", "gv-ghi-789"]
}

POST /global-variable/decrypt​

Decrypt an encrypted variable value.

Request body:

{
"encryptedVariable": "ENC(aBcDeFgHiJkLmNoPqRsTuVwXyZ==)"
}

Response:

{
"status": "Success",
"message": "Variable decrypted successfully",
"data": {
"decryptedValue": "sk-abc123def456ghi789"
}
}

GET /global-variable/options​

Get variable options formatted for dropdown menus. Optionally filter by baseType and/or subType.

Example:

curl "http://localhost:8081/global-variable/options?baseType=string"

Response:

[
{ "label": "DEFAULT_TIMEOUT_MS", "value": "gv-abc-123" },
{ "label": "THIRD_PARTY_API_KEY", "value": "gv-def-456" }
]

Using Variables in Automations​

Global variables can be referenced in step configurations using the \{\{variableName\}\} syntax:

{
"name": "Call Analytics API",
"actionType": "api-call",
"config": {
"url": "https://analytics.example.com/api/v1/reports",
"headers": {
"Authorization": "Bearer {{THIRD_PARTY_API_KEY}}",
"Content-Type": "application/json"
},
"timeout": "{{DEFAULT_TIMEOUT_MS}}"
}
}

At execution time, the job-executor resolves these references by fetching the variable values from the Global Configurator. Encrypted variables are decrypted at resolution time and never exposed in logs or execution output.