Get all automations
https://automations-api.contentstack.com/v1/projects/{project_uid}/automations?limit={limit_value}&skip={skip_value}&asc={field_uid}&desc={field_uid}&include_count={boolean_value}&show_steps={boolean_value}The Get all automations request returns comprehensive information of all the automations created in a project.
To configure the permissions for your application via OAuth, include the automationhub.automations:read scope.
To get a list of automations that are active, you need to pass the query={'active':'true'} parameter.
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.
{
"rules": [
{
"id": "345ae3c033c643***f34fe90032eaaad",
"title": "ChatGPT",
"description": "",
"project_id": "05732fe9f7d6454791715b09a3792f52",
"org_id": "blt4051c65****df287",
"user_id": "blt762406d****c6b33",
"active": true,
"updated_by": "blt762406****1c6b33",
"throttle": false,
"created_at": "2024-02-22T11:32:24.309Z",
"updated_at": "2024-02-22T12:12:08.109Z"
},
{
"id": "b5b0a755a51d4***81d0968fe19a5f62",
"title": "ChatGPT Test 2",
"description": "",
"project_id": "05732fe9f7d6454791715b09a3792f52",
"org_id": "blt4051c6***6ddf287",
"user_id": "blt76240****71c6b33",
"active": false,
"updated_by": "blt76240****71c6b33",
"throttle": false,
"created_at": "2024-02-22T12:12:24.422Z",
"updated_at": "2024-02-22T12:12:24.422Z"
}
]
}Get a single automation
https://automations-api.contentstack.com/v1/projects/{project_uid}/automations/{automation_uid}?show_steps={boolean_value}The Get a single automation request fetches a specific automation from a project in which it was created.
To configure the permissions for your application via OAuth, include the automationhub.automations:read scope.
{
"id": "b5b0a755a51d4****1d0968fe19a5f62",
"title": "ChatGPT Test 2",
"description": "",
"project_id": "05732fe9f7d6454791715b09a3792f52",
"org_id": "blt4051c****6ddf287",
"user_id": "blt76240****71c6b33",
"active": false,
"updated_by": "blt7624****e71c6b33",
"throttle": false,
"created_at": "2024-02-22T12:12:24.422Z",
"updated_at": "2024-02-22T12:12:24.422Z"
}Activate/Deactivate an automation
https://automations-api.contentstack.com/v1/projects/{project_uid}/automations/{automation_uid}The Activate/Deactivate an automation request sets an automation to an active or inactive state.
To configure the permissions for your application via OAuth, include the automationhub.automations:write scope.
Note To activate/deactivate an automation, you must have a trigger and an action configured in your project.
{
"active": true
}{
"message": "automation has been activated successfully"
}