The schedules API provides functionality that allows a administrator to add, delete or update schedules
Table of Contents |
---|
Section | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get all schedulesLists all the schedules configured in the Aspire
Query String Parameters
Filter returned schedules to only those with the given type | description
Filter returned schedules to only those whose description matches the given expression | running | boolean | Optional |
Response
Status
|
Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Geta single scheduleall schedules, filteredLists schedules configured in the Aspire, filtered by a specified criteriaGet information about a single schedule configured in Aspire
Path Query String Parameters
Response
Body Parameters
Response
Status
|
Section | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get a single scheduleGet information about a single schedule configured in Add schedulesAdd one or more schedules to Aspire
Query String Request Body Parameters
Response sequence
| string | Optional | An optional description of the schedule |
| |
{
"schedule": {
"id": "AAABcID5GBc=",
"type": "time",
"description": "Weekend after office",
"running": false,
"enabled": true,
"seed": ["AAABcIueWUd=", "AAABcIueWUe="],
"properties": {
"action": "start",
"crawlType": "incremental",
"scheduleType": "custom",
"schedule": "* * * * 1",
"last": 123456789,
"next": 123456789
},
"message": "optional response message"
} |
Status
Response code | Description |
---|---|
200 | Success |
404 | The given schedules id was not found |
Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Add schedulesAdd schedules to Aspire
Body Parameters
Other parameters passed in the request body will depend on the type of schedule being created. Some candidates are shown below:
Example
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
action | string | Optional | The action to perform by the scheduled task
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
crawlType | string | Optional | The type of crawl to perform by the scheduled task
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
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 |
Code Block | ||
---|---|---|
| ||
POST /aspire/_api/schedules
{
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="],
"action": "start",
"crawlType": "full"
} |
Add multiple schedules
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": "sequence", "description": "Rollup" "enabled": false, "after": "* * * * 1", "seed": ["AAABcIudWUd=", "AAABcIudWUe="], "action": "start", "crawlType": "incrementalfull" }] |
Response
Code Block | ||
---|---|---|
| ||
{ , { "scheduletype": [{ "sequence", "iddescription": "AAABcIueWU0Rollup", "typeenabled": "time"false, "descriptionafter": "Weekly* seeds" * * * 1"enabled": true, "scheduleTypeseed": "weekly", "schedule": "* * * * 1", "seed": ["AAABcIueWUd["AAABcIudWUd=", "AAABcIueWUeAAABcIudWUe="], "action": "start", "crawlType": "fullincremental" }] |
Response
Code Block | ||
---|---|---|
| ||
{ "schedule": [ }, { "id": "AAABcIueWU1AAABcIueWU0", "type": "sequencetime", "description": "RollupWeekly seeds" "enabled": true, "scheduleType": false"weekly", "afterschedule": "* * * * 1", "seed": ["AAABcIudWUdAAABcIueWUd=", "AAABcIudWUeAAABcIueWUe="], "action": "start", "crawlType": "incrementalfull" }] } |
Status
,
{
"id": "AAABcIueWU1",
"type": "sequence",
"description": "Rollup"
"enabled": false,
"after": "* * * * 1",
"seed": ["AAABcIudWUd=", "AAABcIudWUe="],
"action": "start",
"crawlType": "incremental"
}]
} |
Status
Response code | Description |
---|---|
201 | Created |
406 | Not acceptable - there was an issue validating the input |
Section | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Update schedulesUpdate schedules in Aspire.
Body Parameters
Other parameters passed in the request body will depend on the type of schedule being created - see Add schedule(s) above Example
| ||||||||||||||||||||||||||||
Section | ||||||||||||||||||||||||||||
Update schedulesUpdate one or more schedules in Aspire.
Path and Request Body Parameters | ||||||||||||||||||||||||||||
Name | Type | Required | Description | |||||||||||||||||||||||||
id | string | Required | The identifier of the schedule to update | |||||||||||||||||||||||||
type | string | Required | The type of schedule | |||||||||||||||||||||||||
description | string | Optional | An optional description of the schedule |
Code Block | ||
---|---|---|
| ||
PUT /aspire/_api/schedules/AAABcIueWU0%3D
{
"id": "AAABcIueWU0=",
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="],
"action": "start",
"crawlType": "full"
} |
Update multiple schedules
Code Block | ||
---|---|---|
| ||
PUT /aspire/_api/schedules { "AAABcIueWU0=": { "id": "AAABcIueWU0", "type": "time", "description": "Weekly seeds" "enabled": true, "scheduleType": "weekly", "scheduletype": "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
"action": "start",
"crawlType": "incremental"
}]
} |
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 |
Section | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete multiple schedules, filteredDelete multiple schedules from Aspire, filtered by a specified criteria
Body Parameters
Response
See Response Body for details regrading the response body returned where multiple items are affected with some (or all) returning errors Status
|
Section | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete single scheduleDelete a single schedule from Aspire.
Query String Parameters
Example
| ||||||||||||||||||||
Section | ||||||||||||||||||||
Delete schedulesDelete one or more schedules from Aspire.
Path and Query String Parameters | ||||||||||||||||||||
Name | Type | Required | Description | |||||||||||||||||
id | string | Required | The identifier(s) of the schedule(s) to delete |
Code Block | ||
---|---|---|
| ||
DELETE /aspire/_api/schedule/AAABcID5GBc%3D |
Delete multiple schedules
Code Block | ||
---|---|---|
| ||
DELETE /aspire/_api/schedule?id=AAABcID5GBc%3d&id=AAABcIueWUc%3D |
AAABcID5GBc%3D |
Response
Code Block | ||
---|---|---|
| ||
{
"message": "optional response message"
} |
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 |
Section | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Filters
Some endpoint queries require a filter. A filter is basically a JSON object with the following format: Credentials filter: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
Note |
---|
When using delete endpoints, ids in the filter are mandatory. |