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.
Query String Parameters | |||||||
Name | Type | Required | Description | ||||
from | integer | Optional | Indicates the initial page to be retrieved | ||||
size | integer | Optional | Specifies the size of results page | ||||
sortBy | string | Optional | Field by which results are sorted | ||||
sortMode | string | Optional | Sort mode
|
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": |
Response
Code Block | ||
---|---|---|
| ||
{ "schedule": [{ "idtotalItems": "AAABcID5GBc=",1 "type": "time"}, "descriptionschedule": [ "Weekend after office", "running": false, { "enabled": true, "seedid": ["AAABcIueWUd="258962bd-1ad0-4881-af16-ed7774857ab5", "AAABcIueWUe="], "properties": { "actiontype": "starttime", "crawlTypedescription": "incrementalTest schedules", "scheduleTypeenabled": "customtrue", "schedule": "*0 *3 *1/5 ? * 1*", "last": 123456789, "nextafter": 123456789"pepo", }, { "idseeds": "AAABcID5GBc=",[ "type": "sequence", "description": "Sequential schedule "81e23e44-4952-4938-8b1c-67b9101a3aad", "running": false, "enabled": true,09db4593-ce57-4edd-9e24-1dc0d8dc4e24" "seed": ["AAABcIueWUd=", "AAABcIueWUe="], "properties": {], "action": "start", "crawlTypecrawlMode": "incrementalfull", "afterScheduleaction": "AAABcID5GBc=start", "last": 123456789} } }, ... ], "from": 100, "size": 10, "sortBy": "id", "sortMode": "asc", "totalItems": 10000, "message": "optional response message" } |
Status
Lists schedules configured in the Aspire, filtered by a specified criteria
Panel | ||||
---|---|---|---|---|
| ||||
|
Query String Parameters
Sort mode
]
} |
Status: 200
Section | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get a single schedule informationThis endpoint needs at least the ADMINISTRATOR role to be executed.
Path Parameters
Response
Status: 200, 404 |
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Add schedule(s) to AspireThis endpoint needs at least the ADMINISTRATOR role to be executed.
Body Parameters
Other parameters passed in the request body will depend on the type of schedule being created. Some candidates are shown below:
Example
Response
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
| |||||||||||||||||||||||||||||||||||||||||||||
Name | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||
filter | JSON | Required | Filters retrieved credentials. Check the filter definition here |
Code Block | ||
---|---|---|
| ||
{
"credential": [{
"id": "AAABcID5GBc=",
"type": "filesystem",
"description": "Sales HD1 credentials",
"created": 1596707252548,
"updated": 1596707252548,
"properties": { This will be a dynamic JSON object }
},
{
"id": "AAABcIueWUc=",
"type": "filesystem",
"description": "Sales HD2 credentials",
"created": 1596707252548,
"updated": 1596707252548,
"properties": { This will be a dynamic JSON object }
}]
} |
Status
|
Query String Parameters
|
Response
|
Status
Add schedules to Aspire
Panel | ||||
---|---|---|---|---|
| ||||
POST /aspire/_api/schedules |
Body Parameters
The type of schedule to add
The action to perform by the scheduled task
The type of crawl to perform by the scheduled task
Other parameters passed in the request body will depend on the type of schedule being created. Some candidates are shown below:
The type of the time based schedule
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": "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
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
Status: 200 |
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.
Body Parameters
Examples Executes a single schedule
Executes multiple schedules
Response
Status: 200, 404 | ||||||||||||||||||||||||||||||||
Section |
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
Status
Delete a single schedule from Aspire.
Panel | ||||
---|---|---|---|---|
| ||||
|
Query String Parameters
Example
Code Block | ||
---|---|---|
| ||
DELETE /aspire/_api/schedule/AAABcID5GBc%3D |
Response
Code Block | ||
---|---|---|
| ||
{
"message": "optional response message"
} |
Status
Some endpoint queries require a filter. A filter is basically a JSON object with the following format:
Credentials filter:
Code Block | ||
---|---|---|
| ||
"filter" : {
"ids" : ["id1", "id2", "id3"],
"type" : "TYPE",
"description" : "DESCRIPTION"
}
|