Global Variable API
Last updated
Last updated
The Global Variable API provides endpoints for creating, retrieving, updating, and deleting global variables within your Nected workspace. Global variables are reusable data points or configuration settings that can be referenced across workflows and rules.
All Global Variable API endpoints require an authenticated request using the nected-api-key
header. This key is specific to your workspace and must be kept secure.
Note: By default, the nected-api-key is set to private for security purposes. To retrieve your nected-api-key, follow these steps:
Log in to .
Go to Authorization page from the left sidebar
View or regenerate your
nected-api-key
to use in API requests.
For easier testing and exploration, the Global Variable API endpoints are available in a .
Retrieve a paginated list of all global variables in your workspace. This endpoint helps manage and review existing variables, including their values and data types.
Endpoint: GET /dev/variable/get
Method: GET
Description: Retrieves a list of all global variables in your workspace, with pagination support.
Headers:
nected-api-key
(string, required) - Your API key to authenticate and link the request to your workspace. .
name (string) - Name of the global variable.
dataType (string) - Data type of the variable (e.g., string, number).
value (any) - The stored value of the global variable.
checksum (string) - Unique checksum for data integrity verification.
401 Unauthorized: Missing or invalid nected-api-key
.
Example: {"error": "Unauthorized access. Invalid API key."}
Retrieve details of a specific global variable by its name. This endpoint is useful for fetching the details of an individual variable.
Endpoint: GET /dev/variable/get/:name
Method: GET
Description: Fetches details of a specific global variable by name.
Headers:
nected-api-key
(string, required) - Your API key to authenticate and link the request to your workspace.
Path Parameters:
name
(string, required) - Name of the global variable.
name (string) - Name of the global variable.
dataType (string) - Data type of the variable.
value (any) - Stored value of the variable.
checksum (string) - Checksum for data integrity verification.
401 Unauthorized: Missing or invalid nected-api-key
.
Example: {"error": "Unauthorized access. Invalid API key."}
404 Not Found: The specified variable does not exist in the workspace.
Example: {"error": "Global variable not found."}
Create a new global variable in your workspace with a specified name
, dataType
, and value
. This endpoint is useful for adding configuration settings or data points.
Endpoint: POST /dev/variable/create
Method: POST
Description: Creates a new global variable with specified properties.
Headers:
nected-api-key
(string, required) - Your API key to authenticate and link the request to your workspace.
Body (JSON):
name
(string, required) - Name of the global variable.
dataType
(string, required) - Data type (e.g., string, number).
value
(any, required) - Initial value of the global variable.
name (string) - The name of the created global variable.
dataType (string) - Data type of the variable.
value (any) - Initial value of the variable.
checksum (string) - Unique checksum for data integrity verification.
401 Unauthorized: Missing or invalid nected-api-key
.
Example: {"error": "Unauthorized access. Invalid API key."}
409 Conflict: A variable with the specified name already exists.
Example: {"error": "Global variable with this name already exists."}
Update the value of an existing global variable. This endpoint requires a valid checksum
to ensure data integrity and avoid overwriting concurrent changes.
Endpoint: PATCH /dev/variable/update/:name
Method: PATCH
Description: Updates the value of an existing global variable by name.
Headers:
nected-api-key
(string, required) - Your API key to authenticate and link the request to your workspace.
checksum
(string, required) - Current checksum of the variable to prevent concurrent modification.
Path Parameters:
name
(string, required) - Name of the global variable to update.
Body (JSON):
value
(any, required) - New value for the global variable.
name (string) - Name of the updated global variable.
dataType (string) - Data type of the variable.
value (any) - Updated value of the variable.
checksum (string) - New checksum after the update.
401 Unauthorized: Missing or invalid nected-api-key
.
Example: {"error": "Unauthorized access. Invalid API key."}
409 Conflict: Checksum mismatch due to concurrent modifications.
Example: {"error": "Checksum mismatch. Concurrent modification detected."}
Delete a global variable by its name. This endpoint requires a valid checksum
to ensure the request is intentional and to prevent accidental deletions.
Endpoint: DELETE /dev/variable/delete/:name
Method: DELETE
Description: Deletes a global variable by name if the correct checksum
is provided.
Headers:
*`
nected-api-key`** (string, required) - Your API key to authenticate and link the request to your workspace.
checksum
(string, required) - Current checksum of the variable for validation.
Path Parameters:
name
(string, required) - Name of the global variable to delete.
message (string) - Returns "ok" on successful deletion.
401 Unauthorized: Missing or invalid nected-api-key
.
Example: {"error": "Unauthorized access. Invalid API key."}
409 Conflict: Checksum mismatch, indicating that the checksum provided does not match the current state of the variable.
Example: {"error": "Checksum mismatch. Concurrent modification detected."}
Common error responses include:
401 Unauthorized: Indicates that the nected-api-key
is missing or invalid. Ensure that you are using the correct API key for your workspace.
Example Response:
404 Not Found: This error occurs if the specified variable name does not exist in the workspace.
Example Response:
409 Conflict: Checksum mismatch, which can occur if another user or process modified the variable before the request.
Example Response:
This concludes the Global Variable API Documentation. These endpoints provide secure and comprehensive management of global variables within your Nected workspace, enabling flexible and reusable data handling across workflows and rules.