Addigy Custom MDM Variables allow you to save variables within your Addigy Organizations that can later be used in MDM Configurations. This allows you to create a variable, drop it into an MDM configuration and update that variable without having to rebuild your MDM Configuration. We plan to extend variables into other areas of the platform such as Custom Software, Scripts, and much more.
Addigy Custom MDM Variables are configured at the API Level. The API offers 3 different requests to the /api/global_variables/ endpoint that allow for 5 functions, Creating, Updating, Retrieving all variables, Deleting all variables, and Deleting a single variable.
Addigy Facts and Custom Facts can also be used as parameters in MDM Profiles.
(Visit this KB to understand how to use Variables in Smart Software and other Addigy Catalog Items.)
Creating a variable
In order to create a variable, you make a POST request to the global_variables
endpoint.
Example:
curl --location --request POST 'https://prod.addigy.com/api/global_variables' \
--header 'client-id: CLIENT_ID' \
--header 'client-secret: CLIENT_SECRET' \
--data-raw '{
"key": "test_1",
"value": "value_1"
}'
Updating a variable
In order to update a variable, you make a POST request to https://prod.addigy.com/api/global_variables and pass in an already existing key with a different value.
Example:
curl --location --request POST 'https://prod.addigy.com/api/global_variables' \
--header 'client-id: CLIENT_ID' \
--header 'client-secret: CLIENT_SECRET' \
--data-raw '{
"key": "test_1",
"value": "value_2"
}'
Retrieving variables
If you would like to retrieve all variables, you make a GET request to https://prod.addigy.com/api/global_variables this returns a JSON object of all your saved variables.
Example:
curl --location --request GET 'https://prod.addigy.com/api/global_variables' \
--header 'client-id: CLIENT_ID' \
--header 'client-secret: CLIENT_SECRET'
Deleting a Variable
If you would like to delete a single variable you make a DELETE request to the https://prod.addigy.com/api/global_variables endpoint and specify the specific key you would like to remove as a value to the key parameter
Example:
curl --location --request DELETE 'https://prod.addigy.com/api/global_variables?key=test_1' \
--header 'client-id: CLIENT_ID' \
--header 'client-secret: CLIENT_SECRET'
Deleting all Variables
If you would like to remove all global variables from your organization, you would make a DELETE request to the https://prod.addigy.com/api/global_variables endpoint without specifying a single key.
Example:
curl --location --request DELETE 'https://prod.addigy.com/api/global_variables' \
--header 'client-id: CLIENT_ID' \
--header 'client-secret: CLIENT_SECRET'
Using Global Variables inside of a MDM Configuration
Now that you have your global variables created, you can use these variables inside of your MDM Configurations by using the following notation, {{.Data “some_key”}}
.
Let's say you have a SCEP configuration that requires you to rotate the challenge occasionally, you would be able to set the SCEP challenge within the MDM configuration as a variable and programmatically rotate that challenge whenever needed without having to recreate the MDM configuration.