Warning | ||
---|---|---|
| ||
This page is in development and as such, its contents may be incorrect |
The schedules API provides functionality that allows a an administrator to add, delete or update schedules
Easy Heading Free | ||||
---|---|---|---|---|
| ||||
Section | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get all schedulesLists all the schedules configured in the Aspire, this endpoint needs at least the ADMINISTRATOR role to be executed.
Pagination query string parameters Response Sorting query string parameters
Response
Status | ||||||||||||||||||||||||||||
Response code | Description | |||||||||||||||||||||||||||
200 | Success |
Section | |||||||
---|---|---|---|---|---|---|---|
Get all schedules, filteredLists schedules configured in the Aspire, filtered by a specified criteria
|
Status: 200 |
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get a single schedule informationThis endpoint needs at least the ADMINISTRATOR role to be executed.
Path Parameters
| |||||||||||||||
Section | |||||||||||||||
Get a single scheduleGet information about a single schedule configured in Aspire
Path Parameters | |||||||||||||||
Name | Type | Required | Description | ||||||||||||
id | string | Required | The id of the schedule to return | ||||||||||||
Name | Type | Required | Description | ||||||||||||
expand | string | Optional | List of fields to expand, * will expand everything |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "schedule": { "id": "AAABcID5GBc=258962bd-1ad0-4881-af16-ed7774857ab5", "type": "time", "description": "WeekendTest after officeschedules", "running": false, "enabled": "true", "seedschedule": ["AAABcIueWUd=", "AAABcIueWUe="], "properties": {0 3 1/5 ? * *", "actionafter": "startpepo", "crawlTypeseeds": "incremental",[ "scheduleType": "custom81e23e44-4952-4938-8b1c-67b9101a3aad", "schedule": "* * * * 1", "09db4593-ce57-4edd-9e24-1dc0d8dc4e24" "last": 123456789 ], "nextcrawlMode": 123456789"full", }, "messageaction": "start"optional response message"} } |
: 200, 404
Section | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Add schedule(s) to AspireThis endpoint needs at least the ADMINISTRATOR role to be executed. | |||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||
Add schedulesAdd schedules to Aspire
Body ParametersParameters
The action to perform by the scheduled task
crawlType |
Other parameters passed in the request body will depend on the type of schedule being created. Some candidates are shown below: | ||||||||||||||||||||||||||||
Name | Type | Required | Description | ||||||||||||||||||||||||||
enabled | boolean | Optional | Whether this schedule is enabled or not | ||||||||||||||||||||||||||
scheduleType | string | Optional | The type of the time based schedule
| ||||||||||||||||||||||||||
schedule | string | Optional | the cron like schedule for a time based schedule | ||||||||||||||||||||||||||
after | string | Optional | the id of the schedule after which this schedule should run (for a sequence based schedule) | ||||||||||||||||||||||||||
seed | string | Optional | the seed(s) this schedule applies to |
filter for finding seeds this schedules applies to. JSON format follows the format of the filter for seeds. If the above "seeds" parameter has been used, then the "seedsFilter" will be ignored when the schedule starts. | |||
action | string | Required if seeds are used | The action to perform by the scheduled task:
|
crawlMode | string | Required if seeds are used and action = start | The type of crawl to perform by the scheduled task:
|
completeThreshold | number | Optional | Percentage of seeds to complete their crawl before continuing with the next schedule in the sequence. The value is a number up to 1. E.g. 0.69 means 69 %. Default is 1. |
enabled | boolean | Optional | Whether this schedule is enabled or not. Defaults to false if omitted. |
Other parameters passed in the request body will depend on the type of schedule being created. Some candidates are shown below:
Name | Type | Required | Description |
---|---|---|---|
schedule | string | Required if type is "time" | the cron like schedule for a time-based schedule |
scheduleTimeType | string | Required for UI if type is "time" | The type of the time-based schedule
|
after | string | Required if type is "sequence" | the ID of the schedule, after which this schedule should run |
stopOnFail | boolean | Required if type is "sequence" | Whether this schedule sequence will stop if the previous schedule crawl fails is enabled or not. Defaults to false if omitted. |
Example
Code Block | ||||
---|---|---|---|---|
| ||||
POST /aspire/_api/schedules
[ |
Example
Code Block | ||
---|---|---|
| ||
POST /aspire/_api/schedules [{ "type": "time", "description": "Weekly seeds" "enabled": true, "scheduleType": "weekly", "schedule": "* * * * 1", "seed": ["AAABcIueWUd=", "AAABcIueWUe="], "action": "start", "crawlType": "full" }, { "type": "sequencetime", "description": "RollupWeekly seeds" "enabled": falsetrue, "afterstopOnFail": "*true, * * * 1"scheduleTimeType": "weekly", "seedschedule": ["AAABcIudWUd=", "AAABcIudWUe="]"0 0 0 ? * SUN *", "actioncompleteThreshold": "start"0.65, "crawlTypeseeds": "incremental" }] |
Response
Code Block | ||
---|---|---|
| ||
{["AAABcIueWUd=", "AAABcIueWUe="], "scheduleseedsFilter": [{ "idtags": ["AAABcIueWU0tag1","tag2"]}, "action": "start", "typecrawlMode": "timefull" }, { "type": "sequence", "description": "Weekly seedsRollup" "enabled": truefalse, "scheduleTypestopOnFail": "weekly"true, "scheduleafter": "*0 0 0 ? * *SUN * 1", "seedcompleteThreshold": 0.65, "seeds": ["AAABcIueWUdAAABcIudWUd=", "AAABcIueWUeAAABcIudWUe="], "actionseedsFilter": {"start", "crawlType": "full" tags":["tag1","tag2"]}, { "id"action": "AAABcIueWU1start", "typecrawlMode": "sequenceincremental", "description": }] |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "schedule": [{"Rollup" "enabledid": false"AAABcIueWU0", "aftertype": "* * * * 1time", "seeddescription": ["AAABcIudWUd=",Weekly seeds"AAABcIudWUe="], "actionenabled": "start"true, "crawlTypestopOnFail": "incremental" }] } |
Status
Update schedules in Aspire.
Panel | ||||
---|---|---|---|---|
| ||||
|
Body Parameters
Other parameters passed in the request body will depend on the type of schedule being created - see Add schedule(s) above
Example
Code Block | ||
---|---|---|
| ||
PUT /aspire/_api/schedules
{
"AAABcIueWU0=": {
"id": "AAABcIueWU0",
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="],
"action": "start",
"crawlType": "full"
},
"AAABcIueWU1": {
"id": "AAABcIueWU1",
"type": "sequence",
"description": "Rollup"
"enabled": false,
"after": "* * * * 1",
"seed": ["AAABcIudWUd=", "AAABcIudWUe="],
"action": "start",
"crawlType": "incremental"
}
} |
Response
Code Block | ||
---|---|---|
| ||
{
"schedule": [{
"id": "AAABcIueWU0",
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="],
"action": "start",
"crawlType": "full"
},
{
"id": "AAABcIueWU1",
"type": "sequence",
"description": "Rollup"
"enabled": false,
"after": "* * * * 1",
"seed": ["AAABcIudWUd=", "AAABcIudWUe="],
"action": "start",
"crawlType": "incremental"
}]
} |
Status
Delete multiple schedules from Aspire, filtered by a specified criteria
Panel | ||||
---|---|---|---|---|
| ||||
|
Body Parameters
Response
Code Block | ||
---|---|---|
| ||
{
"message": "optional response message"
} |
See Response Body for details regrading the response body returned where multiple items are affected with some (or all) returning errors
true,
"scheduleTimeType": "weekly",
"schedule": "0 0 0 ? * SUN *",
"completeThreshold": 0.65,
"seeds": ["AAABcIueWUd=", "AAABcIueWUe="],
"seedsFilter":{"tags":["tag1","tag2"]},
"action": "start",
"crawlMode": "full"
},
{
"id": "AAABcIueWU1",
"type": "sequence",
"description": "Rollup"
"enabled": false,
"stopOnFail": true,
"after": "0 0 0 ? * SUN *",
"completeThreshold": 0.65,
"seeds": ["AAABcIudWUd=", "AAABcIudWUe="],
"seedsFilter":{"tags":["tag1","tag2"]},
"action": "start",
"crawlMode": "incremental"
}]
} |
See Response Body for details regarding the response body returned where multiple items are affected with some (or all) returning errors
Status: 201, 406
Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Update schedule(s)Update schedules in Aspire. This endpoint needs at least the ADMINISTRATOR role to be executed.
Path Parameters
Body Parameters
x - at least one field must be present Example
Response
Status: 200, 404, 406
|
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete schedules(s)Delete one or more schedules from Aspire. This endpoint needs at least the ADMINISTRATOR role to be executed.
Path Parameters and Query parameters
Body Parameter
Examples
Response
Status: 200, 404, 406
|
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Export schedule(s)Export one or more schedule from Aspire, this endpoint needs at least the OPERATOR role to be executed.
Path Parameters and Query parameters
Body Parameter
Examples
Response
Status: 200, 404, 406
|
Section |
---|
ImportThe import usage can be found here |
Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Filters
Some endpoint queries require a filter. A filter is basically a JSON object with the following format: Schedule filter:
|
Section | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Execute schedulesExecute schedules, either sequence or time based. This endpoint needs at least an ADMINISTRATOR role to be executed | ||||||||||||||||||||||||||||||||||||
Response code | Description | |||||||||||||||||||||||||||||||||||
200 | Success | |||||||||||||||||||||||||||||||||||
404 | Not found - a given credential identifier was not found | |||||||||||||||||||||||||||||||||||
406 | Not acceptable - there was an issue validating the input | |||||||||||||||||||||||||||||||||||
Section | ||||||||||||||||||||||||||||||||||||
Delete single scheduleDelete a single schedule from Aspire.
Path Body Parameters
Examples Executes a single schedule
Executes multiple schedules
ResponseExample
Response
Status | ||||||||||||||||||||||||||||||||||||
Response code | Description | |||||||||||||||||||||||||||||||||||
200 | Success | |||||||||||||||||||||||||||||||||||
404 | Not found - a given schedule identifier was not found | 406 | Not acceptable - there was an issue validating the input
| |||
{
"AAABcIueWU1": {
"status": "success"
},
"AAABcIueWU2": {
"status": "failed"
}
} |
Status: 200, 404