curl --request GET \
--url https://apiweb.mile.app/api/v3/task/schedules \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/task/schedules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/task/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/task/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/task/schedules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/task/schedules")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/task/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"taskSchedules": {
"current_page": 1,
"data": [
{
"hubId": "634e98498ce07d29474a7e29",
"name": "Daily Morning Visit",
"periode": "daily",
"flow": "Visit",
"flowId": "67be687c128306111e022022",
"task": {
"receiverName": "Miguel",
"address": "gambir jakarta pusat",
"coordinates": "",
"weight": "5"
},
"schedules": [
{
"time": [
"07:00"
]
}
],
"startTime": "2022-11-02",
"endTime": "2022-11-05",
"createdBy": "Pablo",
"timeSchedules": [
"07:00"
],
"organizationId": "634e98098ce07d29474a7e22",
"updatedTime": "2022-11-01T07:28:23+00:00",
"createdTime": "2022-11-01T07:28:23+00:00",
"_id": "6352736c628401059b37a2e2"
},
{
"hubId": "667b8e62b76860782a455e62",
"name": "Biweekly Inspection",
"periode": "custom",
"flow": "Inspection",
"flowId": "67be688e128306111e022025",
"task": {
"reportContent": "Biweekly Inspection",
"createdFrom": "SCHEDULER"
},
"assignee": [
"worker@paket.id"
],
"schedules": [
{
"day": "monday",
"time": [
"01:00"
]
}
],
"startTime": "2024-09-01 00:00",
"endTime": "2024-12-31 23:59",
"frequency": "weekly",
"interval": 2,
"createdBy": "admin@paket.id",
"timeSchedules": [
"monday 01:00"
],
"organizationId": "634e98098ce07d29474a7e22",
"updatedTime": "2024-08-26T00:47:42+00:00",
"createdTime": "2024-08-26T00:47:42+00:00",
"_id": "66cbd0aec0835f7336006992"
}
],
"first_page_url": "https://apiweb.mile.app/api/v3/task/schedules?limit=10&hubId=634fa8f119f4de35c534ad12&page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://apiweb.mile.app/api/v3/task/schedules?limit=10&hubId=634fa8f119f4de35c534ad12&page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://apiweb.mile.app/api/v3/task/schedules?limit=10&hubId=634fa8f119f4de35c534ad12&page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://apiweb.mile.app/api/v3/task/schedules",
"per_page": 10,
"prev_page_url": null,
"to": 5,
"total": 5
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Read task schedule
curl --request GET \
--url https://apiweb.mile.app/api/v3/task/schedules \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/task/schedules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/task/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/task/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/task/schedules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/task/schedules")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/task/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"taskSchedules": {
"current_page": 1,
"data": [
{
"hubId": "634e98498ce07d29474a7e29",
"name": "Daily Morning Visit",
"periode": "daily",
"flow": "Visit",
"flowId": "67be687c128306111e022022",
"task": {
"receiverName": "Miguel",
"address": "gambir jakarta pusat",
"coordinates": "",
"weight": "5"
},
"schedules": [
{
"time": [
"07:00"
]
}
],
"startTime": "2022-11-02",
"endTime": "2022-11-05",
"createdBy": "Pablo",
"timeSchedules": [
"07:00"
],
"organizationId": "634e98098ce07d29474a7e22",
"updatedTime": "2022-11-01T07:28:23+00:00",
"createdTime": "2022-11-01T07:28:23+00:00",
"_id": "6352736c628401059b37a2e2"
},
{
"hubId": "667b8e62b76860782a455e62",
"name": "Biweekly Inspection",
"periode": "custom",
"flow": "Inspection",
"flowId": "67be688e128306111e022025",
"task": {
"reportContent": "Biweekly Inspection",
"createdFrom": "SCHEDULER"
},
"assignee": [
"worker@paket.id"
],
"schedules": [
{
"day": "monday",
"time": [
"01:00"
]
}
],
"startTime": "2024-09-01 00:00",
"endTime": "2024-12-31 23:59",
"frequency": "weekly",
"interval": 2,
"createdBy": "admin@paket.id",
"timeSchedules": [
"monday 01:00"
],
"organizationId": "634e98098ce07d29474a7e22",
"updatedTime": "2024-08-26T00:47:42+00:00",
"createdTime": "2024-08-26T00:47:42+00:00",
"_id": "66cbd0aec0835f7336006992"
}
],
"first_page_url": "https://apiweb.mile.app/api/v3/task/schedules?limit=10&hubId=634fa8f119f4de35c534ad12&page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://apiweb.mile.app/api/v3/task/schedules?limit=10&hubId=634fa8f119f4de35c534ad12&page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://apiweb.mile.app/api/v3/task/schedules?limit=10&hubId=634fa8f119f4de35c534ad12&page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://apiweb.mile.app/api/v3/task/schedules",
"per_page": 10,
"prev_page_url": null,
"to": 5,
"total": 5
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Authorizations
Use a valid Bearer token to authenticate.
Query Parameters
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 task schedule objects.
Example: name, periode, flow, hubId, etc.
Default: createdTime
sortOrder is to decide ascending or descending order
Example: asc or desc.
Default: desc
Limit of vehicles result list.
Example: 10.
Default: 20
Pagination of vehicles result list.
Example: 2.
Default: 1
finding data by name task scheduler.
Example: Morning
The unique name of organization's flow.
Use Flow /flows API to get the list of flow names.
Example: Visit
The identifier for the flow that generated by system. Use Flow /flows API to get the list of flow id.
Example: 63d8c9b0dbd5ef20a627dd86
finding data running on SUCCESS or FAILED, acceptable value:SUCCESS,FAILED.
Example: SUCCESS
User email for a given task.
Example: worker@paket.id,jhon@paket.id
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,periode,hubId.