Skip to main content
GET
/
automations
Read automation
curl --request GET \
  --url https://apiweb.mile.app/api/v3/automations \
  --header 'Authorization: Bearer <token>'
{
  "status": true,
  "message": "Success",
  "data": {
    "current_page": 1,
    "data": [
      {
        "name": "Auto webhook automation",
        "event": "onTaskFinished",
        "automationType": "webhook",
        "dataType": "task",
        "automationDetails": {
          "url": "https://apiweb.mile.app/webhook",
          "headers": {
            "x-api-key": "1234e98498ce07d29474a7ev2",
            "org": "general"
          }
        },
        "rules": {
          "flow": "Pickup",
          "flowId": "667b712f63020e5f182f0cb2"
        },
        "organizationId": "621dd813eb3ebf16b94dbde3",
        "isActive": true,
        "updatedTime": "2022-07-13T03:16:40+00:00",
        "createdTime": "2022-07-13T03:16:40+00:00",
        "_id": "62ce3918d3f3e1681a3a54b5"
      }
    ],
    "first_page_url": "http://apiweb.mile.app/api/v3/automations?q=automation%201&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://apiweb.mile.app/api/v3/automations?q=automation%201&page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "active": false
      },
      {
        "url": "http://apiweb.mile.app/api/v3/automations?q=automation%201&page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "active": false
      }
    ],
    "next_page_url": null,
    "path": "http://apiweb.mile.app/api/v3/automations",
    "per_page": 10,
    "prev_page_url": null,
    "to": 1,
    "total": 1
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Query Parameters

page
integer
default:1

The page number of results to retrieve. Example: 2

limit
integer
default:20

Specifies the maximum number of items to retrieve in a single request. Example: 10

Required range: 1 <= x <= 1000
q
string

Query param search. This field will search automation according to similar value of name, automation type or flow Example: Automation Tigaraksa, createTask, Delivery

sortBy
string

sortBy is used to sort the result-set in ascending or descending order according to selected field. The value of this param is one of available fields on automation objects. Example: name, flow, automationType, createdTime, etc. Default: createdTime

sortOrder
string

sortOrder is to decide ascending or descending order Example: asc or desc. Default: desc

fields
string

Fields is for selecting the specific fields that you can choose by multiples to show in the response using a string with a comma delimiter. Example: name,automationType,flow.

event
string

Act as a trigger that start an automation. Example: onTaskCreated

automationType
string

Automation's type. The action of automation. Example: webhook.

dataType
string

Automation's data type. Example: task.

flow
string

FlowName to select specific task for event to happens. Use GET /flows API to get the list of Flow. Example: Pickup

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

data
object

List of object automation.