> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mileapp.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Read log automation



## OpenAPI

````yaml /openapi/public/openapi-flow.json get /automation-log
openapi: 3.0.0
info:
  title: MileApp API - Flow
  version: 3.0.0
  description: MileApp API Documentation - RESTful API for field operations management.
servers:
  - url: https://apiweb.mile.app/api/v3
security:
  - bearerAuth: []
tags:
  - name: Flow
    description: >-
      Flow in MileApp is the mobile field application workflow, setting it
      correctly is critical to the success of the field workers in doing their
      job efficiently. Flow attributes consist of IDs, pages, components,
      configurations, and time. The Flow will be used at Task, Automation, or
      Schedule.


      **To see the details of flow object, please follow [this
      link](#tag/flow_model)**
  - name: Automation
    description: >-
      Automation enables you to set up automation based on tasks' events and
      data source's events. It might help you automate creation of tasks, task
      assignment, task placement, task webhook, data source update, datasource
      creation, and data source webhook. Automation attributes consist of IDs,
      automation name, automation type, automation details, and rules.


      **To see the details of automation object, please follow [this
      link](#tag/automation_model)**
paths:
  /automation-log:
    get:
      tags:
        - Automation
      summary: Read log automation
      operationId: getAutomationLog
      parameters:
        - name: limit
          in: query
          required: false
          description: |-
            Limit of automation logs list.
            **Example:** `20`.
            **Default:** `10`
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: |-
            Pagination of automation logs list.
            **Example:** `2`.
            **Default:** `1`
          schema:
            type: integer
            format: int32
        - name: sortBy
          in: query
          required: false
          description: >-
            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`
          schema:
            type: string
        - name: sortOrder
          in: query
          required: false
          description: |-
            sortOrder is to decide ascending or descending order
            **Example:** `asc` or `desc`.
            **Default:** `desc`
          schema:
            type: string
        - name: startDate
          in: query
          required: false
          description: >-
            startDate & endDate is used to select range of time of automation
            log.

            **Example:** `2022-08-10`
          schema:
            type: string
        - name: endDate
          in: query
          required: false
          description: >-
            startDate & endDate is used to select range of time of automation
            log.

            **Example:** `2022-08-10`
          schema:
            type: string
        - name: taskId
          in: query
          required: false
          description: >-
            The identifier for Task that generated by system. Use [GET /tasks
            API](#tag/Task) to get the list of Task IDs.

            **Example:** `621dd813xy3ebf16b94d6969`
          schema:
            type: string
        - name: automationId
          in: query
          required: false
          description: >-
            The identifier for Automation that generated by system. Use [GET
            /automations API](#tag/Automation) to get the list of Automation
            IDs.

            **Example:** `621dd813xy3ebf16b87d6969`
          schema:
            type: string
        - name: isSuccess
          in: query
          required: false
          description: >-
            for selecting automation log of success or failed, acceptable
            value:true,false. leave it empty if you want to get all data.

            **Example:** `true`
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                title: NetworkLogResponse
                properties:
                  status:
                    type: boolean
                    description: Status of response.
                  message:
                    description: Message of API response.
                    type: string
                  total:
                    type: integer
                    description: Total data of automation logs.
                  data:
                    description: List of automation logs object.
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  params:
                    type: object
                    description: Params of automation logs.
                    additionalProperties: true
                example:
                  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
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    description: Shows if the request was successful.
                  message:
                    type: string
                    description: A short message explaining what went wrong.
                example:
                  status: false
                  message: Bad request - invalid parameters provided.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    description: Shows if the request was successful.
                  message:
                    type: string
                    description: A short message explaining what went wrong.
                example:
                  status: false
                  message: Internal server error, please contact support@mile.app.
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use a valid Bearer token to authenticate.

````