Skip to main content
GET
/
data
Read data source
curl --request GET \
  --url https://apiweb.mile.app/api/v3/data \
  --header 'Authorization: Bearer <token>'
{
  "status": true,
  "message": "Success",
  "data": {
    "current_page": 1,
    "data": [
      {
        "_id": "63dc641b1ed1fd63ad0c9013",
        "dataId": "Outlet",
        "dataTypeId": "63db2fb476bc679c540369c4",
        "outletName": "Cabang Jakarta Pusat",
        "outletHours": 12,
        "outletType": "minimarket",
        "outletOpen": "09:00",
        "outletClosed": "17:00",
        "outletContractExpired": "2023-02-02",
        "outletOpenInWeekend": true,
        "outletGeolocation": "-6.171702325136309,106.81775093078615",
        "outletPhoneNumber": "+62 123 456 789",
        "outletCloseOrder": "2023-02-02 17:00:00",
        "data_type": {
          "_id": "660cd7c159fcd16a3a2e6537",
          "name": "outlets"
        },
        "hubId": "63c63ab1b6972d3150348172",
        "organizationId": "63c61d865347e356d05e3052",
        "updatedBy": "john.doe@mile.app",
        "createdBy": "john.doe@mile.app",
        "updatedTime": "2023-02-03 01:32:11",
        "createdTime": "2023-02-03 01:32:11"
      }
    ],
    "first_page_url": "https://apiweb.mile.app/v3/data?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://apiweb.mile.app/v3/data?page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "active": false
      },
      {
        "url": "https://apiweb.mile.app/v3/data?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "active": false
      }
    ],
    "next_page_url": null,
    "path": "https://apiweb.mile.app/v3/data",
    "per_page": 20,
    "prev_page_url": null,
    "to": 15,
    "total": 15
  }
}

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

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

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: dataId,dataTypeId,organizationId

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 data source objects. Example: dataId, dataTypeId, hubId, etc. Default: createdTime

sortOrder
string

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

hubId
string

Fundamental entity within an organization, serving as the central point for managing various operational components. Use Use GET /hubs endpoint to get the list of Hub IDs. Example: 634e98498ce07d29474a7e29

dataId
string

Name or unique identifier value associated with data source. You can do a multipe filter dataId using separator coma (,) Example: Outlet or Outlet,Toko

dataTypeId
string

The identifier for Data Type. Use GET /data-types API to get the list of Data Type IDs. Example: 63db2fb476bc679c540369c4

dataTypeName
string

Name of data type. Use GET /data-types API to get the list of dataType Name. Example: Pegawai

updatedTime
string<date-time>

The time at which the data is updated. Example: 2023-07-06T06:41:08

limitUser
boolean

Parameter to restrict data source based on user. The default value of this parameter is true. If limitUser is true, the data source will be limited based on user. and if limitUser is false, data source will show all data without any limitation based on user. Example: false

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

data
object

List of object data source.