curl --request POST \
--url https://apiweb.mile.app/api/v3/task/schedules/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schedules": [
{
"hubId": "<string>",
"name": "<string>",
"periode": "<string>",
"flow": "<string>",
"flowId": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"task": {},
"assignee": "<array>",
"interval": 50,
"frequency": "daily"
}
]
}
'{
"success": 1,
"failed": 1,
"schedules": [
{
"status": true,
"message": "Task Scheduler has been created",
"_id": "63fc2ccaea976f77fb2ff802",
"name": "Daily Morning Visit"
},
{
"status": false,
"message": "The schedules field is required.",
"_id": "63fc2ccaea976f77fb2ff802",
"name": "Visit"
}
],
"failed_index": [
1
]
}curl --request POST \
--url https://apiweb.mile.app/api/v3/task/schedules/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schedules": [
{
"hubId": "<string>",
"name": "<string>",
"periode": "<string>",
"flow": "<string>",
"flowId": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"task": {},
"assignee": "<array>",
"interval": 50,
"frequency": "daily"
}
]
}
'{
"success": 1,
"failed": 1,
"schedules": [
{
"status": true,
"message": "Task Scheduler has been created",
"_id": "63fc2ccaea976f77fb2ff802",
"name": "Daily Morning Visit"
},
{
"status": false,
"message": "The schedules field is required.",
"_id": "63fc2ccaea976f77fb2ff802",
"name": "Visit"
}
],
"failed_index": [
1
]
}Use a valid Bearer token to authenticate.
50Show child attributes
Fundamental entity within an organization, serving as the central point for managing various operational components. Use GET /hubs endpoint to get the list of Hub IDs. Example: 634e98498ce07d29474a7e29
The name of task schedule. User can define task schedule name with task's flow name combined with running time, or something else.
Example: Daily Morning Visit
There are 5 types of periode: daily, weekly, monthly, byDate, custom. Period of time when the task scheduler running.
Example: daily
The unique name of organization's flow. Use Flow /flows API to get the list of flow names.
Example: Visit
The Identifier of organization's flow. Use Flow /flows API to get the list of flow ids.
Example: 67be687c128306111e022022
Start date of task scheduler to active. this field only available when periode's value is one of: daily, weekly, monthly
Example: 2022-11-02
End date of task scheduler to active. this field only available when periode's value is one of: daily, weekly, monthly
Example: 2022-11-05
data of task according to selected flow.
Example:
{
'receiverName':'miguel',
'coordinates':'-6.230815251,106.75684387',
'address':'rawamangun jakarta timur'
}
List of user email that will be assigned to the generated task. Example: ['jhon@sample.com']
Number units of frequency between each scheduled execution. For example, an interval of 2 with a frequency of daily means the task will run every 2 days. This required when select the custom periode.
Example: daily
1 <= x <= 99Specified unit of time for the scheduling interval. Determines how often the scheduled task will run based on the interval value.This required when select the custom periode.
Example: daily
daily, weekly, monthly Success
Total number of success created schedule.
Total number of failed created schedule.
List of failed index of schedule.