Skip to main content
GET
/
automation-log
Read log automation
curl --request GET \
  --url https://apiweb.mile.app/api/v3/automation-log \
  --header 'Authorization: Bearer <token>'
{
  "status": true,
  "message": "elasticData",
  "total": 1,
  "data": [
    {
      "_index": "log-automationdev-2022.08.10",
      "_type": "_doc",
      "_id": "-DethoIBewA7zVXNTstW",
      "_score": null,
      "_source": {
        "finishRequestTime": "2022-08-10 07:34:31",
        "automationEvent": "onTaskCreated",
        "attempt": "0",
        "automationId": "62f25ada1c0cd810800157c2",
        "timestamp": "2022-08-10 07:34:31",
        "name": "automation log",
        "response": "{\"status\":true,\"code\":201,\"message\":\"Task has been created\",\"task\":{\"createdFrom\":\"Automation\",\"flow\":\"Test Flow Import Visit\",\"startTime\":\"2022-08-09T13:02:48+00:00\",\"endTime\":\"2022-08-10T13:02:48+00:00\",\"hubId\":\"622976f50b8db203ef31d312\",\"input4\":\"08:00\",\"input9\":0,\"input3\":\"123,234\",\"input2\":\"malang\",\"input5\":\"17:00\",\"input6\":0,\"input8\":0,\"input1\":\"dendi\",\"select1\":null,\"title\":\"dendi\",\"content\":\"malang\",\"geoLock\":[{\"geoLocation\":\"123,234\",\"radius\":null}],\"useGeoLock\":false,\"geoLockTrigger\":null,\"flowId\":\"625678f90fc8ba02bb5eb432\",\"organizationId\":\"621dd813eb3ebf16b94dbde3\",\"status\":\"UNASSIGNED\",\"hub\":{\"_id\":\"622976f50b8db203ef31d312\",\"name\":\"JAKARTA\",\"lat\":-6.174739001608504,\"lng\":106.79002412883601},\"orderIndex\":166011687171396,\"createdBy\":null,\"updatedTime\":\"2022-08-10T07:34:31+00:00\",\"createdTime\":\"2022-08-10T07:34:31+00:00\",\"_id\":\"62f35f8710bf27537c61d1c2\"}}",
        "automationUrl": "/api/v3/task",
        "automationDetails": "{\"taskData\":{\"input9\":null,\"input8\":null,\"select1\":null,\"input6\":null,\"input5\":null,\"input4\":null,\"input3\":\"123,234\",\"input2\":\"malang\",\"input1\":\"$refFlow.title\"},\"flow\":\"Test Flow Import Visit\"}",
        "severity": "NOTICE",
        "statusCode": "201",
        "startRequestTime": "2022-08-10 07:34:31.6996",
        "delayTime": "1660114849.699626",
        "automationName": "automation log",
        "@timestamp": "2022-08-10T07:34:34.873Z",
        "request": "{\"createdFrom\":\"Automation\",\"flow\":\"Test Flow Import Visit\",\"startTime\":\"2022-08-09T13:02:48.000000Z\",\"endTime\":\"2022-08-10T13:02:48.000000Z\",\"hubId\":\"622976f50b8db203ef31d312\",\"input4\":null,\"input9\":null,\"input3\":\"123,234\",\"input2\":\"malang\",\"input5\":null,\"input6\":null,\"input8\":null,\"input1\":\"dendi\",\"select1\":null}",
        "dispatchAt": "2022-08-10 07:34:31",
        "dataType": "task",
        "env": "dev",
        "organizationId": "621dd813eb3ebf16b94dbde3",
        "isSuccess": "true",
        "@version": "1",
        "referenceId": "62f25af61c0cd810800157c3",
        "responseTime": "0.04303693771362305",
        "automationType": "createTask"
      },
      "sort": [
        1660116874873
      ]
    }
  ],
  "params": {
    "from": 0,
    "size": 10,
    "query": {
      "bool": {
        "must": [
          {
            "term": {
              "organizationId.keyword": "621dd813eb3ebf16b94dbde3"
            }
          },
          {
            "term": {
              "automationId.keyword": "62f25ada1c0cd810800157c2"
            }
          }
        ]
      }
    },
    "sort": [
      {
        "@timestamp": {
          "order": "desc"
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Query Parameters

limit
string

Limit of automation logs list. Example: 20. Default: 10

page
integer<int32>

Pagination of automation logs list. Example: 2. Default: 1

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. Default: @timestamp

sortOrder
string

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

startDate
string

startDate & endDate is used to select range of time of automation log. Example: 2022-08-10

endDate
string

startDate & endDate is used to select range of time of automation log. Example: 2022-08-10

taskId
string

The identifier for Task that generated by system. Use GET /tasks API to get the list of Task IDs. Example: 621dd813xy3ebf16b94d6969

automationId
string

The identifier for Automation that generated by system. Use GET /automations API to get the list of Automation IDs. Example: 621dd813xy3ebf16b87d6969

isSuccess
boolean

for selecting automation log of success or failed, acceptable value:true,false. leave it empty if you want to get all data. Example: true

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

total
integer

Total data of automation logs.

data
object[]

List of automation logs object.

params
object

Params of automation logs.