Set the order of a project's automations (tenant:forge:write and maintainer, or tenant:forge:admin)
POST /api/forge/v1/projects/{key}/automations/reorder
Module: Forge · operationId: reorderForgeAutomations · Tag: Automations · Auth: access token (Authorization: Bearer <accessToken>)
Requires tenant:forge:admin, or tenant:forge:write and project role maintainer or admin; an archived project is 409 project_archived. ids names every automation of the project exactly once (else 400 ids). Automations that listen to the same event run in this order.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key |
path | string | yes | Project key (e.g. APP) |
Request body
application/json (required)
ids(array of string (uuid), required): Every automation of the project, in the new order
Example:
{
"ids": [
"1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e02",
"1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e01"
]
}
Responses
- 204 Reordered
- 400 Error (
application/json) - 403 Error (
application/json) - 404 Error (
application/json) - 409 Error (
application/json)
Example request
curl -X POST 'https://api.mbcom.cloud/api/forge/v1/projects/string/automations/reorder' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"ids":["1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e02","1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e01"]}'