The Create global automation variable operation will create a new variable or update an existing variable with the specified request body.
Request
Request URI
Method | Request URI |
---|---|
POST | https://{company-name}.helloid.com/api/v1/automation/variable/ |
Request parameters
Parameter | Description |
---|---|
{company-name} | The company name of the target company |
Request headers
Header | Description |
---|---|
Content-Type | Required. Must be set to application/json. |
Sample request body
{
"name" : "var1",
"value": "def456",
"secret": false
}
Request body parameters
Parameter | Description | Required/Optional | Default value |
---|---|---|---|
{Name} | Name of the variable | Required | - |
{Value} | Value of the variable | Required | - |
{Secret} | A boolean value indicating if the value of the variable should be encrypted.. | Optional | false |
{OverwriteIfExists} | A boolean value indicating if the variable should be overwritten it already exists (based on the variable name). | Optional | false |
{ItemGuid} | The GUID of the item that the variable should be linked. If omitting or left empty the new variable will be a global variable. | Optional | NULL |
{ItemType} | The type of the specified item that the variable should be linked. If omitting or left empty the new variable will be a global variable. Possible values: 0. Global 1. Task 2. Script 3. Action |
Optional | 0 |
Generated fields
The GUID fields will be auto-generated by HelloID
Response
Response status
Code | Description |
---|---|
200(OK) | Indicates that the operation was successful and the resource is created. |
400(BAD REQUEST) | Indicates that the operation was not successful. There were validation errors or the request body was malformed.If there were validation errors, the response will include a error result. |
401(UNAUTHORIZED) | Indicates that no authentication header was given or the api key and secret were invalid. If the api key and secret were valid check the configuration in your portal, it is possibilty these were IP restricted or are disabled. |
Please also see error result.
Please also see common HTTP status codes.
Sample response body
{
"automationVariableGuid": "2ed257c4-a326-466b-a495-1d7536c682bf",
"name": "var1",
"value": "def456",
"secret": false
}
Example request with cURL
Replace placeholder values surrounded by {
}
with the actual values.
curl -u {api-key}:{api-secret} -X POST https://{company-name}.helloid.com/api/v1/automation/variable/var1 -H "Content-Type:application/json" -d "{ "value": "def456", "secret": false }"