Page in development
This page is in development and as such, its contents may be incorrect
The schedules API provides functionality that allows a administrator to add, delete or update schedules
Lists all the schedules configured in the Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
GET /aspire/_api/schedules
Pagination query string parameters
Lists schedules configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the OPERATOR role to be executed.
Response TODO: check this schedule format
{ "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 }, { "id": "AAABcID5GBc=", "type": "sequence", "description": "Sequential schedule", "running": false, "enabled": true, "seed": ["AAABcIueWUd=", "AAABcIueWUe="], "properties": { "action": "start", "crawlType": "incremental", "afterSchedule": "AAABcID5GBc=", "last": 123456789 } }, ... ], "from": 100, "size": 10, "sortBy": "id", "sortMode": "asc", "totalItems": 10000, "message": "optional response message" }
Status: 200
Get information about a single schedule configured in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
GET /aspire/_api/schedules/:id
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The id of the schedule to return |
Response TODO: check this schedule format
{ "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: 200, 404
Add schedules to Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
POST /aspire/_api/schedules
Body Parameters TODO: check the schedule format
Name | Type | Required | Description |
---|---|---|---|
type | string | Required | The type of schedule to add
|
description | string | Required | An optional description of the schedule |
action | string | Optional | The action to perform by the scheduled task
|
crawlType | string | Optional | 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:
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 |
Example TODO: check the schedule format
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 TODO: check the schedule format
{ "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" }] }
See Response Body for details regarding the response body returned where multiple items are affected with some (or all) returning errors
Status: 201, 406
Update schedules in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
PUT /aspire/_api/schedules/:id
PUT /aspire/_api/schedules
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the schedule to update |
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the schedule to update |
... | .. |
Other parameters passed in the request body will depend on the type of schedule being created - see Add schedule(s) above
Example TODO: check the schedule format
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 TODO: check the schedule format
{ "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" }] }
See Response Body for details regarding the response body returned where multiple items are affected with some (or all) returning errors
Status: 200, 404, 406
Update schedules configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.
PUT /aspire/_api/schedules/updateAll
Response
{ "message": "update result response message" }
Status: 200, 406
Delete multiple schedules from Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.
POST /aspire/_api/schedules/deleteAll
Response
{ "message": "optional response message" }
Status: 200
Delete one or more schedules from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
DELETE /aspire/_api/schedules/:id
DELETE /aspire/_api/schedules
POST /aspire/_api/schedules/delete
Path Parameters and Query parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier(s) of the schedule(s) to delete |
Body Parameter
Name | Type | Required | Description |
---|---|---|---|
ids | string | Required | The identifier(s) of the schedule(s) to delete |
Examples
DELETE /aspire/_api/schedules/AAABcID5GBc DELETE /aspire/_api/schedules?id=AAABcID5GBc&id=AAABcID5GBd POST /aspire/_api/schedules/delete { "ids":["AAABcID5GBc","AAABcID5GBd"] }
Response
{ "message": "delete result response message" }
Status: 200, 404, 406