Project Variables
Get all project variables
https://automations-api.contentstack.com/v1/projects/{project_uid}/variables?limit={limit_value}&skip={skip_value}&asc={field_uid}&desc={field_uid}&include_count={boolean_value}The Get all project variables request returns comprehensive information of all the project variables defined in a project.
To configure the permissions for your application via OAuth, include the automationhub.variables:read scope.
Note If you do not specify a value for the optional “limit” query parameter, the API request will by default return the initial 100 items.
{
"variables": [
{
"key": "Key1",
"value": "1234567",
"org_id": "blt******5ea6ddf287",
"project_id": "05732fe9f7d6454791715b09a3792f52",
"type": "text",
"created_at": "2024-02-22T11:32:54.440Z",
"updated_at": "2024-02-22T11:33:09.574Z",
"id": "fe4c65e93a664948b24854277af477da"
},
{
"key": "Key2",
"value": "ENC_123456789014;2WjbDeWolmvVJVsm;vjFptQQq3+I/V27Uru97/g==;wKoBGVLgsw==",
"org_id": "blt******5ea6ddf287",
"project_id": "05732fe9f7d6454791715b09a3792f52",
"type": "password",
"created_at": "2024-02-22T11:33:03.772Z",
"updated_at": "2024-02-22T11:33:03.772Z",
"id": "f7bbf2d9cb894b5aa34b3d28603ae174"
}
]
}Get a single project variable
https://automations-api.contentstack.com/v1/projects/{project_uid}/variables/{variable_uid}The Get a single project variable request fetches a specific project variable defined in a project.
To configure the permissions for your application via OAuth, include the automationhub.variables:read scope.
{
"key": "Key2",
"value": "ENC_123456789014;2WjbDeWolmvVJVsm;vjFptQQq3+I/V27Uru97/g==;wKoBGVLgsw==",
"org_id": "blt******5ea6ddf287",
"project_id": "05732fe9f7d6454791715b09a3792f52",
"type": "password",
"created_at": "2024-02-22T11:33:03.772Z",
"updated_at": "2024-02-22T11:33:03.772Z",
"id": "f7bbf2d9cb894b5aa34b3d28603ae174"
}Create a project variable
https://automations-api.contentstack.com/v1/projects/{project_uid}/variablesThe Create a project variable request lets you create a project variable in a project.
To configure the permissions for your application via OAuth, include the automationhub.variables:write scope.
{
"key": "Key3",
"type": "text",
"value": "password@1234"
}{
"key": "Key3",
"value": "password@1234",
"org_id": "blt******5ea6ddf287",
"project_id": "05732fe9f7d6454791715b09a3792f52",
"type": "text",
"created_at": "2024-02-22T13:38:36.439Z",
"updated_at": "2024-02-22T13:38:36.439Z",
"id": "bd0ce37910cb4172b844308aa07e6bf7"
}Update a project variable
https://automations-api.contentstack.com/v1/projects/{project_uid}/variables/{variable_uid}The Update a project variable request lets you update the key, value and type of a project variable.
To configure the permissions for your application via OAuth, include the automationhub.variables:write scope.
{
"key": "Key3",
"type": "text",
"value": "abcd@1234"
}{
"key": "Key3",
"value": "abcd@1234",
"org_id": "blt******5ea6ddf287",
"project_id": "05732fe9f7d6454791715b09a3792f52",
"type": "text",
"created_at": "2024-02-22T13:38:36.439Z",
"updated_at": "2024-02-22T13:42:23.560Z",
"id": "bd0ce37910cb4172b844308aa07e6bf7"
}Delete a project variable
https://automations-api.contentstack.com/v1/projects/{project_uid}/variables/{variable_uid}The Delete a project variable request lets you delete a specific project variable from a project.
To configure the permissions for your application via OAuth, include the automationhub.variables:write scope.
{
"message": "Project variable deleted successfully."
}