LegalStack

Автоматизации

Автоматизации: конструктор и запуск.

Список автоматизаций

GET
/api/v1/automations
АвторизацияBearer <токен>

В: header

Параметры запроса

status?string

Фильтр по статусу: draft, active, disabled

Тело ответа

application/json

curl -X GET "https://loading/api/v1/automations"
[
  {
    "createdAt": "string",
    "createdBy": "string",
    "description": "string",
    "edges": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "folderId": "string",
    "id": "string",
    "lastRunAt": "string",
    "lastStatus": "string",
    "name": "string",
    "nodes": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "runsCount": 0,
    "status": "string",
    "updatedAt": "string",
    "validationIssues": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "property1": null,
    "property2": null
  }
]

Создать автоматизацию

POST
/api/v1/automations
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

curl -X POST "https://loading/api/v1/automations" \  -H "Content-Type: application/json" \  -d '{    "edges": [      {        "id": "string",        "source": "string",        "target": "string"      }    ],    "name": "string",    "nodes": [      {        "category": "trigger",        "id": "string",        "kind": "trigger",        "label": "string",        "position": {          "x": 0,          "y": 0        },        "type": "string"      }    ]  }'
{
  "createdAt": "string",
  "createdBy": "string",
  "description": "string",
  "edges": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "folderId": "string",
  "id": "string",
  "lastRunAt": "string",
  "lastStatus": "string",
  "name": "string",
  "nodes": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "runsCount": 0,
  "status": "string",
  "updatedAt": "string",
  "validationIssues": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "property1": null,
  "property2": null
}

Получить автоматизацию

GET
/api/v1/automations/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор автоматизации

Тело ответа

application/json

curl -X GET "https://loading/api/v1/automations/string"
{
  "createdAt": "string",
  "createdBy": "string",
  "description": "string",
  "edges": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "folderId": "string",
  "id": "string",
  "lastRunAt": "string",
  "lastStatus": "string",
  "name": "string",
  "nodes": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "runsCount": 0,
  "status": "string",
  "updatedAt": "string",
  "validationIssues": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "property1": null,
  "property2": null
}

Удалить автоматизацию

DELETE
/api/v1/automations/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор автоматизации

Тело ответа

application/json

curl -X DELETE "https://loading/api/v1/automations/string"
{
  "message": "string"
}

Обновить автоматизацию

PUT
/api/v1/automations/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор автоматизации

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

curl -X PUT "https://loading/api/v1/automations/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "createdAt": "string",
  "createdBy": "string",
  "description": "string",
  "edges": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "folderId": "string",
  "id": "string",
  "lastRunAt": "string",
  "lastStatus": "string",
  "name": "string",
  "nodes": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "runsCount": 0,
  "status": "string",
  "updatedAt": "string",
  "validationIssues": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "property1": null,
  "property2": null
}

Активировать автоматизацию

POST
/api/v1/automations/{id}/activate
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор автоматизации

Тело ответа

application/json

curl -X POST "https://loading/api/v1/automations/string/activate"
{
  "createdAt": "string",
  "createdBy": "string",
  "description": "string",
  "edges": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "folderId": "string",
  "id": "string",
  "lastRunAt": "string",
  "lastStatus": "string",
  "name": "string",
  "nodes": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "runsCount": 0,
  "status": "string",
  "updatedAt": "string",
  "validationIssues": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "property1": null,
  "property2": null
}

Деактивировать автоматизацию

POST
/api/v1/automations/{id}/deactivate
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор автоматизации

Тело ответа

application/json

curl -X POST "https://loading/api/v1/automations/string/deactivate"
{
  "createdAt": "string",
  "createdBy": "string",
  "description": "string",
  "edges": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "folderId": "string",
  "id": "string",
  "lastRunAt": "string",
  "lastStatus": "string",
  "name": "string",
  "nodes": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "runsCount": 0,
  "status": "string",
  "updatedAt": "string",
  "validationIssues": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "property1": null,
  "property2": null
}

Запустить автоматизацию вручную

POST
/api/v1/automations/{id}/run
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор автоматизации

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

curl -X POST "https://loading/api/v1/automations/string/run" \  -H "Content-Type: application/json" \  -d '{}'
{
  "automationId": "string",
  "error": "string",
  "finishedAt": "string",
  "id": "string",
  "startedAt": "string",
  "status": "string",
  "property1": null,
  "property2": null
}

История прогонов автоматизации

GET
/api/v1/automations/{id}/runs
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор автоматизации

Параметры запроса

limit?string

Максимум записей, до 200 (по умолчанию 50)

Тело ответа

application/json

curl -X GET "https://loading/api/v1/automations/string/runs"
[
  {
    "automationId": "string",
    "error": "string",
    "finishedAt": "string",
    "id": "string",
    "startedAt": "string",
    "status": "string",
    "property1": null,
    "property2": null
  }
]