Automations & Self-Service Actions

Get Flows

GET/api/v1/flows
Query parameters
Response

Successful Response

Body
items*Items
totalTotal

Total items

current_pageCurrent Page

Cursor to refetch the current page

current_page_backwardsCurrent Page Backwards

Cursor to refetch the current page starting from the last item

previous_pagePrevious Page

Cursor for the previous page

next_pageNext Page

Cursor for the next page

Request
const response = await fetch('/api/v1/flows', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "text",
      "title": "text",
      "description": "text",
      "icon": "text",
      "isActive": true,
      "needsApproval": false,
      "type": "automation",
      "triggers": [
        {
          "type": "onEvent",
          "conditions": [
            {
              "field": "text",
              "expression": false,
              "operator": "eq"
            }
          ],
          "event": {
            "resource": "entity",
            "action": [
              "create"
            ]
          }
        }
      ],
      "actions": [
        {
          "type": "upsertResource",
          "id": "text",
          "title": "text",
          "description": "text",
          "conditions": [
            {
              "field": "text",
              "expression": false,
              "operator": "eq"
            }
          ]
        }
      ],
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "createdAt": "2024-09-08T00:32:54.376Z",
      "updatedAt": "2024-09-08T00:32:54.376Z"
    }
  ],
  "current_page": "text",
  "current_page_backwards": "text",
  "previous_page": "text",
  "next_page": "text"
}

Create Flow

POST/api/v1/flows
Query parameters
Body
id*Id
title*Title
descriptionDescription
iconIcon
isActiveIsactive
needsApprovalNeedsapproval
orderOrder
type*FlowType

An enumeration.

automationselfServiceActionscorecardreference
argumentsArguments
secretsSecrets
triggersTriggers
actionsActions
outputsOutputs
tagsTags
Response

Successful Response

Body
id*Id
title*Title
descriptionDescription
iconIcon
isActiveIsactive
needsApprovalNeedsapproval
orderOrder
type*FlowType

An enumeration.

automationselfServiceActionscorecardreference
argumentsArguments
secretsSecrets
triggersTriggers
actionsActions
outputsOutputs
tagsTags
createdAt*Createdat
createdByCreatedby
updatedAt*Updatedat
updatedByUpdatedby
Request
const response = await fetch('/api/v1/flows', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "id": "text",
      "title": "text",
      "type": "automation"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "title": "text",
  "description": "text",
  "icon": "text",
  "isActive": true,
  "needsApproval": false,
  "type": "automation",
  "triggers": [
    {
      "type": "onEvent",
      "conditions": [
        {
          "field": "text",
          "expression": false,
          "operator": "eq"
        }
      ],
      "event": {
        "resource": "entity",
        "action": [
          "create"
        ]
      }
    }
  ],
  "actions": [
    {
      "type": "upsertResource",
      "id": "text",
      "title": "text",
      "description": "text",
      "conditions": [
        {
          "field": "text",
          "expression": false,
          "operator": "eq"
        }
      ]
    }
  ],
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ],
  "createdAt": "2024-09-08T00:32:54.376Z",
  "updatedAt": "2024-09-08T00:32:54.376Z"
}

Get Flow

GET/api/v1/flows/{id_}
Path parameters
id_*Id
Response

Successful Response

Body
id*Id
title*Title
descriptionDescription
iconIcon
isActiveIsactive
needsApprovalNeedsapproval
orderOrder
type*FlowType

An enumeration.

automationselfServiceActionscorecardreference
argumentsArguments
secretsSecrets
triggersTriggers
actionsActions
outputsOutputs
tagsTags
createdAt*Createdat
createdByCreatedby
updatedAt*Updatedat
updatedByUpdatedby
Request
const response = await fetch('/api/v1/flows/{id_}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "title": "text",
  "description": "text",
  "icon": "text",
  "isActive": true,
  "needsApproval": false,
  "type": "automation",
  "triggers": [
    {
      "type": "onEvent",
      "conditions": [
        {
          "field": "text",
          "expression": false,
          "operator": "eq"
        }
      ],
      "event": {
        "resource": "entity",
        "action": [
          "create"
        ]
      }
    }
  ],
  "actions": [
    {
      "type": "upsertResource",
      "id": "text",
      "title": "text",
      "description": "text",
      "conditions": [
        {
          "field": "text",
          "expression": false,
          "operator": "eq"
        }
      ]
    }
  ],
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ],
  "createdAt": "2024-09-08T00:32:54.376Z",
  "updatedAt": "2024-09-08T00:32:54.376Z"
}

Upsert Flow

PUT/api/v1/flows/{id_}
Path parameters
id_*Id
Query parameters
Body
id*Id
title*Title
descriptionDescription
iconIcon
isActiveIsactive
needsApprovalNeedsapproval
orderOrder
type*FlowType

An enumeration.

automationselfServiceActionscorecardreference
argumentsArguments
secretsSecrets
triggersTriggers
actionsActions
outputsOutputs
tagsTags
Response

Successful Response

Body
id*Id
title*Title
descriptionDescription
iconIcon
isActiveIsactive
needsApprovalNeedsapproval
orderOrder
type*FlowType

An enumeration.

automationselfServiceActionscorecardreference
argumentsArguments
secretsSecrets
triggersTriggers
actionsActions
outputsOutputs
tagsTags
createdAt*Createdat
createdByCreatedby
updatedAt*Updatedat
updatedByUpdatedby
Request
const response = await fetch('/api/v1/flows/{id_}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "id": "text",
      "title": "text",
      "type": "automation"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "title": "text",
  "description": "text",
  "icon": "text",
  "isActive": true,
  "needsApproval": false,
  "type": "automation",
  "triggers": [
    {
      "type": "onEvent",
      "conditions": [
        {
          "field": "text",
          "expression": false,
          "operator": "eq"
        }
      ],
      "event": {
        "resource": "entity",
        "action": [
          "create"
        ]
      }
    }
  ],
  "actions": [
    {
      "type": "upsertResource",
      "id": "text",
      "title": "text",
      "description": "text",
      "conditions": [
        {
          "field": "text",
          "expression": false,
          "operator": "eq"
        }
      ]
    }
  ],
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ],
  "createdAt": "2024-09-08T00:32:54.376Z",
  "updatedAt": "2024-09-08T00:32:54.376Z"
}

Delete Flow

DELETE/api/v1/flows/{id_}
Path parameters
id_*Id
Response

Successful Response

Request
const response = await fetch('/api/v1/flows/{id_}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}

Get Suggestions

GET/api/v1/suggestions
Query parameters
Response

Successful Response

Body
items*Items
totalTotal

Total items

current_pageCurrent Page

Cursor to refetch the current page

current_page_backwardsCurrent Page Backwards

Cursor to refetch the current page starting from the last item

previous_pagePrevious Page

Cursor for the previous page

next_pageNext Page

Cursor for the next page

Request
const response = await fetch('/api/v1/suggestions', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "text",
      "title": "text",
      "description": "text",
      "originType": "automation",
      "originId": "text",
      "sourceType": "entity",
      "sourceId": "text",
      "targetType": "entity",
      "targetId": "text",
      "targetIdOverride": "text",
      "ignored": false,
      "autoApply": false,
      "lastAppliedAt": "2024-09-08T00:32:54.376Z",
      "createdAt": "2024-09-08T00:32:54.376Z",
      "updatedAt": "2024-09-08T00:32:54.376Z"
    }
  ],
  "current_page": "text",
  "current_page_backwards": "text",
  "previous_page": "text",
  "next_page": "text"
}

Create Suggestion

POST/api/v1/suggestions
Body
idId
title*Title
descriptionDescription
originType*OriginType

An enumeration.

automation
originId*Originid
sourceType*SourceType

An enumeration.

entity
sourceId*Sourceid
sourceContextSourcecontext
targetType*TargetType

An enumeration.

entity
targetId*Targetid
targetContextTargetcontext
targetIdOverrideTargetidoverride
dataData
ignoredIgnored
autoApplyAutoapply
lastAppliedAtLastappliedat
Response

Successful Response

Body
idId
title*Title
descriptionDescription
originType*OriginType

An enumeration.

automation
originId*Originid
sourceType*SourceType

An enumeration.

entity
sourceId*Sourceid
sourceContextSourcecontext
targetType*TargetType

An enumeration.

entity
targetId*Targetid
targetContextTargetcontext
targetIdOverrideTargetidoverride
dataData
ignoredIgnored
autoApplyAutoapply
lastAppliedAtLastappliedat
createdAt*Createdat
createdByCreatedby
updatedAt*Updatedat
updatedByUpdatedby
additionalInfoAdditionalinfo
Request
const response = await fetch('/api/v1/suggestions', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "title": "text",
      "originType": "automation",
      "originId": "text",
      "sourceType": "entity",
      "sourceId": "text",
      "targetType": "entity",
      "targetId": "text"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "title": "text",
  "description": "text",
  "originType": "automation",
  "originId": "text",
  "sourceType": "entity",
  "sourceId": "text",
  "targetType": "entity",
  "targetId": "text",
  "targetIdOverride": "text",
  "ignored": false,
  "autoApply": false,
  "lastAppliedAt": "2024-09-08T00:32:54.376Z",
  "createdAt": "2024-09-08T00:32:54.376Z",
  "updatedAt": "2024-09-08T00:32:54.376Z"
}

Get Suggestion

GET/api/v1/suggestions/{id_}
Path parameters
id_*Id
Response

Successful Response

Body
idId
title*Title
descriptionDescription
originType*OriginType

An enumeration.

automation
originId*Originid
sourceType*SourceType

An enumeration.

entity
sourceId*Sourceid
sourceContextSourcecontext
targetType*TargetType

An enumeration.

entity
targetId*Targetid
targetContextTargetcontext
targetIdOverrideTargetidoverride
dataData
ignoredIgnored
autoApplyAutoapply
lastAppliedAtLastappliedat
createdAt*Createdat
createdByCreatedby
updatedAt*Updatedat
updatedByUpdatedby
additionalInfoAdditionalinfo
Request
const response = await fetch('/api/v1/suggestions/{id_}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "title": "text",
  "description": "text",
  "originType": "automation",
  "originId": "text",
  "sourceType": "entity",
  "sourceId": "text",
  "targetType": "entity",
  "targetId": "text",
  "targetIdOverride": "text",
  "ignored": false,
  "autoApply": false,
  "lastAppliedAt": "2024-09-08T00:32:54.376Z",
  "createdAt": "2024-09-08T00:32:54.376Z",
  "updatedAt": "2024-09-08T00:32:54.376Z"
}

Upsert Suggestion

PUT/api/v1/suggestions/{id_}
Path parameters
id_*Id
Body
idId
title*Title
descriptionDescription
originType*OriginType

An enumeration.

automation
originId*Originid
sourceType*SourceType

An enumeration.

entity
sourceId*Sourceid
sourceContextSourcecontext
targetType*TargetType

An enumeration.

entity
targetId*Targetid
targetContextTargetcontext
targetIdOverrideTargetidoverride
dataData
ignoredIgnored
autoApplyAutoapply
lastAppliedAtLastappliedat
Response

Successful Response

Body
idId
title*Title
descriptionDescription
originType*OriginType

An enumeration.

automation
originId*Originid
sourceType*SourceType

An enumeration.

entity
sourceId*Sourceid
sourceContextSourcecontext
targetType*TargetType

An enumeration.

entity
targetId*Targetid
targetContextTargetcontext
targetIdOverrideTargetidoverride
dataData
ignoredIgnored
autoApplyAutoapply
lastAppliedAtLastappliedat
createdAt*Createdat
createdByCreatedby
updatedAt*Updatedat
updatedByUpdatedby
additionalInfoAdditionalinfo
Request
const response = await fetch('/api/v1/suggestions/{id_}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "title": "text",
      "originType": "automation",
      "originId": "text",
      "sourceType": "entity",
      "sourceId": "text",
      "targetType": "entity",
      "targetId": "text"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "title": "text",
  "description": "text",
  "originType": "automation",
  "originId": "text",
  "sourceType": "entity",
  "sourceId": "text",
  "targetType": "entity",
  "targetId": "text",
  "targetIdOverride": "text",
  "ignored": false,
  "autoApply": false,
  "lastAppliedAt": "2024-09-08T00:32:54.376Z",
  "createdAt": "2024-09-08T00:32:54.376Z",
  "updatedAt": "2024-09-08T00:32:54.376Z"
}

Delete Suggestion

DELETE/api/v1/suggestions/{id_}
Path parameters
id_*Id
Response

Successful Response

Request
const response = await fetch('/api/v1/suggestions/{id_}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}

Apply Suggestion

POST/api/v1/suggestions/{id_}/apply
Path parameters
id_*Id
Query parameters
Body
targetIdOverrideTargetidoverride
Response

Successful Response

Body
dryRunDryrun
ignoredIgnored
previousStatePreviousstate
newStateNewstate
Request
const response = await fetch('/api/v1/suggestions/{id_}/apply', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "dryRun": false,
  "ignored": false
}

Troubleshooting

Troubleshooting

Last updated