The schedule schedules API provides functionality that allows a an administrator to add, delete or update schedules
Easy Heading Free | ||||
---|---|---|---|---|
| ||||
Section | |||||||
---|---|---|---|---|---|---|---|
List Get all schedulesLists all the schedules configured in the Aspire, this endpoint needs at least the ADMINISTRATOR role to be executed.
Query String Parameters | |||||||
Name | Type | Required | Description | ||||
type | string | Optional | Filter returned schedules to only those with the given type | ||||
description | string | Optional | Filter returned schedules to only those whose description matches the given expression |
schedules |
Pagination query string parameters
Sorting query string parameters
Section | |||||||
---|---|---|---|---|---|---|---|
Get all schedules, filteredLists schedules configured in Aspire, filtered by the specified criteria, this endpoint needs at least the OPERATOR role to be executed.
Pagination query string parameters |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{
"count": {
"totalItems": 1
} |
Response
Code Block | ||
---|---|---|
| ||
{ "schedule": [{ "id": "AAABcID5GBc=", "type": "time", "descriptionschedule": "Weekly seeds" [ "running": false, { "enabled "id": true"258962bd-1ad0-4881-af16-ed7774857ab5", "time": { "scheduleTypetype": "weeklytime", "scheduledescription": "* * * * 1Test schedules", "last": 123456789, "nextenabled": 123456789"true", }, "seed "schedule": ["AAABcIueWUd=", "AAABcIueWUe="] }, { "0 3 1/5 ? * *", "id": "AAABcIueWUc=", "typeafter": "sequentialpepo", "description": "Rollup" "runningseeds": false,[ "enabled": false, "sequence": { "after": "AAABcID5GBc="81e23e44-4952-4938-8b1c-67b9101a3aad", "last": 123456789, }, "seed": ["AAABcIueWUd=", "AAABcIueWUe="] }, 09db4593-ce57-4edd-9e24-1dc0d8dc4e24" ... }], "message "crawlMode": "optional response message" } |
Status
full",
"action": "start"
}
]
} |
Status: 200
Section | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get a single scheduleinformationThis endpoint needs at least the ADMINISTRATOR role to be executed.Get information about a single schedule configured in Aspire
Query String and Path Parameters
Response
Status | ||||||||||||||||||||||
Response code | Description | |||||||||||||||||||||
200 | Success | |||||||||||||||||||||
404 | The given schedules id was not found |
"81e23e44-4952-4938-8b1c-67b9101a3aad",
"09db4593-ce57-4edd-9e24-1dc0d8dc4e24"
],
"crawlMode": "full",
"action": "start"
}
} |
Status: 200, 404
Section | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Add schedule(s)to AspireThis endpoint needs at least the ADMINISTRATOR role to be executed.Add one or more schedules to Aspire
Request Body ParametersParameters
Other parameters passed in the request body will depend on the type of schedule being created. Some candidates are shown below | |||||||||||||||||||
Name | Description | ||||||||||||||||||
enabled | Whether this schedule is enabled or not | ||||||||||||||||||
scheduleType | The type of the time based schedule
| ||||||||||||||||||
schedule | the cron like schedule for a time based schedule | ||||||||||||||||||
after | the id of the schedule after which this schedule should run (for a sequence based schedule) | ||||||||||||||||||
seed | the seed(s) this schedule applies to |
seeds | string | Optional | the seed(s) this schedule applies to (If we do not insert seeds, the schedule is useful just for testing purposes) |
seedsFilter | string | Optional | The 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
[{
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"stopOnFail": true,
"scheduleTimeType": "weekly",
"schedule": "0 0 0 ? * SUN *",
"completeThreshold": 0.65,
"seeds": ["AAABcIueWUd=", "AAABcIueWUe="],
"seedsFilter":{"tags":["tag1","tag2"]},
"action": "start",
"crawlMode": "full"
},
{
"type": "sequence",
|
Examples
Add a single schedule
Code Block | ||
---|---|---|
| ||
{
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="]
} |
Add multiple schedules
Code Block | ||
---|---|---|
| ||
[{
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="]
},
{
"type": "sequence",
"description": "Rollup"
"enabled": false,
"after": "* * * * 1",
"seed": ["AAABcIudWUd=", "AAABcIudWUe="]
}] |
Response
Code Block | ||
---|---|---|
| ||
{ "schedule": [{ "id": "AAABcIueWU0", "type": "time", "description": "Weekly seeds" "enabled": true, "scheduleType": "weekly", "schedule": "* * * * 1", "seed": ["AAABcIueWUd=", "AAABcIueWUe="] }, { "id": "AAABcIueWU1", "type": "sequence", "description": "Rollup" "enabled": false, "stopOnFail": true, "after": "*0 0 0 ? * *SUN * 1", "completeThreshold": 0.65, "seedseeds": ["AAABcIudWUd=", "AAABcIudWUe="] }], , "messageseedsFilter": "optional response message{"tags":["tag1","tag2"]}, "action": "start", "crawlMode": "incremental" }] |
StatusResponse
Code Block |
---|
|
|
|
Update one or more schedules in Aspire. Updates will be treated as partial updates rather than overwrites. If a field is not present in the input, any previous value will remain after the update. If you wish to "delete" a value, pass a value of null
Panel | ||||
---|---|---|---|---|
| ||||
PUT /aspire_api/schedule |
Request Body Parameters
| |
{
"schedule": [{
"id": "AAABcIueWU0",
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"stopOnFail": 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 |
Code Block | ||
---|---|---|
| ||
{
"id": "AAABcIueWU0",
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="]
} |
Update multiple schedules
Code Block | ||
---|---|---|
| ||
[{
"id": "AAABcIueWU0",
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="]
},
{
"id": "AAABcIueWU1",
"type": "sequence",
"description": "Rollup"
"enabled": false,
"after": "* * * * 1",
"seed": ["AAABcIudWUd=", "AAABcIudWUe="]
}] |
Response
Code Block | ||
---|---|---|
| ||
{
"schedule": [{
"id": "AAABcIueWU0",
"type": "time",
"description": "Weekly seeds"
"enabled": true,
"scheduleType": "weekly",
"schedule": "* * * * 1",
"seed": ["AAABcIueWUd=", "AAABcIueWUe="]
},
{
"id": "AAABcIueWU1",
"type": "sequence",
"description": "Rollup"
"enabled": false,
"after": "* * * * 1",
"seed": ["AAABcIudWUd=", "AAABcIudWUe="]
}],
"message": "optional response message"
} |
Status
Delete one or more schedules from Aspire.
Panel | ||||
---|---|---|---|---|
| ||||
|
Query String, Path and Request Body Parameters
Name | Type | Required | Description | ||
---|---|---|---|---|---|
id | string | Required | The | identifier(s)ID of the schedule | (s) to delete
Examples
Delete Executes a single schedule
Code Block | ||
---|---|---|
| ||
{ "id" : "AAABcID5GBc=AAABcIueWU1" } |
Delete Executes multiple schedules
Code Block | ||
---|---|---|
| ||
[{ "id" : ["AAABcID5GBc=AAABcIueWU1" }, { "idAAABcIueWU2":] "AAABcIueWUc=" }] |
ResponseDelete multiple schedules (alternative form)
Code Block | ||||
---|---|---|---|---|
| ||||
{ "id "AAABcIueWU1": { "status": ["AAABcID5GBc=", "AAABcIueWUc="] } |
Response
Code Block | ||
---|---|---|
| ||
success" }, "AAABcIueWU2": { "message "status": "failed"optional response message"} } |
: 200, 404