MechaMental
Api reference

Actions

List Actions

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id

Query Parameters

search?|

Search by name or description

limit?Limit

Maximum number of items to return (1-200)

Default50
Range1 <= value <= 200
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/apps/string/actions"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "actions": [
    {
      "action_id": "string",
      "workspace_id": "string",
      "app_id": "string",
      "endpoint_id": "string",
      "name": "string",
      "description": "string",
      "namespace_id": "string",
      "thread_mode": "new_each_run",
      "thread_id": "string",
      "thread_id_template": "string",
      "payload": {},
      "action_type": "trigger",
      "schedule_type": "cron",
      "cron_expression": "string",
      "scheduled_at": "2019-08-24T14:15:22Z",
      "timezone": "string",
      "max_retries": 0,
      "retry_delay_seconds": 0,
      "is_enabled": true,
      "is_running": true,
      "next_run_at": "2019-08-24T14:15:22Z",
      "last_run_at": "2019-08-24T14:15:22Z",
      "last_run_status": "pending",
      "last_execution_id": "string",
      "total_runs": 0,
      "successful_runs": 0,
      "failed_runs": 0,
      "created_by": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Create Action

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/apps/string/actions" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "endpoint_id": "string",    "namespace_id": "string"  }'
{
  "action_id": "string",
  "workspace_id": "string",
  "app_id": "string",
  "endpoint_id": "string",
  "name": "string",
  "description": "string",
  "namespace_id": "string",
  "thread_mode": "new_each_run",
  "thread_id": "string",
  "thread_id_template": "string",
  "payload": {},
  "action_type": "trigger",
  "schedule_type": "cron",
  "cron_expression": "string",
  "scheduled_at": "2019-08-24T14:15:22Z",
  "timezone": "string",
  "max_retries": 0,
  "retry_delay_seconds": 0,
  "is_enabled": true,
  "is_running": true,
  "next_run_at": "2019-08-24T14:15:22Z",
  "last_run_at": "2019-08-24T14:15:22Z",
  "last_run_status": "pending",
  "last_execution_id": "string",
  "total_runs": 0,
  "successful_runs": 0,
  "failed_runs": 0,
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Action

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions/{action_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
action_id*Action Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/apps/string/actions/string"
{
  "action_id": "string",
  "workspace_id": "string",
  "app_id": "string",
  "endpoint_id": "string",
  "name": "string",
  "description": "string",
  "namespace_id": "string",
  "thread_mode": "new_each_run",
  "thread_id": "string",
  "thread_id_template": "string",
  "payload": {},
  "action_type": "trigger",
  "schedule_type": "cron",
  "cron_expression": "string",
  "scheduled_at": "2019-08-24T14:15:22Z",
  "timezone": "string",
  "max_retries": 0,
  "retry_delay_seconds": 0,
  "is_enabled": true,
  "is_running": true,
  "next_run_at": "2019-08-24T14:15:22Z",
  "last_run_at": "2019-08-24T14:15:22Z",
  "last_run_status": "pending",
  "last_execution_id": "string",
  "total_runs": 0,
  "successful_runs": 0,
  "failed_runs": 0,
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Delete Action

DELETE
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions/{action_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
action_id*Action Id

Header Parameters

authorization?string|null

Response Body

application/json

curl -X DELETE "https://loading/v1/orgs/string/workspaces/string/apps/string/actions/string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Action

PUT
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions/{action_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
action_id*Action Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://loading/v1/orgs/string/workspaces/string/apps/string/actions/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "action_id": "string",
  "workspace_id": "string",
  "app_id": "string",
  "endpoint_id": "string",
  "name": "string",
  "description": "string",
  "namespace_id": "string",
  "thread_mode": "new_each_run",
  "thread_id": "string",
  "thread_id_template": "string",
  "payload": {},
  "action_type": "trigger",
  "schedule_type": "cron",
  "cron_expression": "string",
  "scheduled_at": "2019-08-24T14:15:22Z",
  "timezone": "string",
  "max_retries": 0,
  "retry_delay_seconds": 0,
  "is_enabled": true,
  "is_running": true,
  "next_run_at": "2019-08-24T14:15:22Z",
  "last_run_at": "2019-08-24T14:15:22Z",
  "last_run_status": "pending",
  "last_execution_id": "string",
  "total_runs": 0,
  "successful_runs": 0,
  "failed_runs": 0,
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Trigger Action

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions/{action_id}/trigger

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
action_id*Action Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/apps/string/actions/string/trigger" \  -H "Content-Type: application/json" \  -d '{}'
{
  "action_id": "string",
  "run_id": "string",
  "execution_id": "string",
  "status": "pending",
  "message": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

List Action Runs

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions/{action_id}/runs

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
action_id*Action Id

Query Parameters

status?|

Filter by status

limit?Limit

Maximum number of items to return (1-200)

Default50
Range1 <= value <= 200
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/apps/string/actions/string/runs"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "runs": [
    {
      "run_id": "string",
      "action_id": "string",
      "workspace_id": "string",
      "execution_id": "string",
      "status": "pending",
      "attempt": 0,
      "trigger_type": "manual",
      "triggered_at": "2019-08-24T14:15:22Z",
      "started_at": "2019-08-24T14:15:22Z",
      "completed_at": "2019-08-24T14:15:22Z",
      "duration_seconds": 0,
      "resolved_payload": {},
      "resolved_thread_id": "string",
      "error_message": "string",
      "error_code": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Action Run

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions/{action_id}/runs/{run_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
action_id*Action Id
run_id*Run Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/apps/string/actions/string/runs/string"
{
  "run_id": "string",
  "action_id": "string",
  "workspace_id": "string",
  "execution_id": "string",
  "status": "pending",
  "attempt": 0,
  "trigger_type": "manual",
  "triggered_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z",
  "duration_seconds": 0,
  "resolved_payload": {},
  "resolved_thread_id": "string",
  "error_message": "string",
  "error_code": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Enable Action

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions/{action_id}/enable

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
action_id*Action Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/apps/string/actions/string/enable"
{
  "action_id": "string",
  "workspace_id": "string",
  "app_id": "string",
  "endpoint_id": "string",
  "name": "string",
  "description": "string",
  "namespace_id": "string",
  "thread_mode": "new_each_run",
  "thread_id": "string",
  "thread_id_template": "string",
  "payload": {},
  "action_type": "trigger",
  "schedule_type": "cron",
  "cron_expression": "string",
  "scheduled_at": "2019-08-24T14:15:22Z",
  "timezone": "string",
  "max_retries": 0,
  "retry_delay_seconds": 0,
  "is_enabled": true,
  "is_running": true,
  "next_run_at": "2019-08-24T14:15:22Z",
  "last_run_at": "2019-08-24T14:15:22Z",
  "last_run_status": "pending",
  "last_execution_id": "string",
  "total_runs": 0,
  "successful_runs": 0,
  "failed_runs": 0,
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Disable Action

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/actions/{action_id}/disable

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
action_id*Action Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/apps/string/actions/string/disable"
{
  "action_id": "string",
  "workspace_id": "string",
  "app_id": "string",
  "endpoint_id": "string",
  "name": "string",
  "description": "string",
  "namespace_id": "string",
  "thread_mode": "new_each_run",
  "thread_id": "string",
  "thread_id_template": "string",
  "payload": {},
  "action_type": "trigger",
  "schedule_type": "cron",
  "cron_expression": "string",
  "scheduled_at": "2019-08-24T14:15:22Z",
  "timezone": "string",
  "max_retries": 0,
  "retry_delay_seconds": 0,
  "is_enabled": true,
  "is_running": true,
  "next_run_at": "2019-08-24T14:15:22Z",
  "last_run_at": "2019-08-24T14:15:22Z",
  "last_run_status": "pending",
  "last_execution_id": "string",
  "total_runs": 0,
  "successful_runs": 0,
  "failed_runs": 0,
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}