The schedules API provides functionality that allows a administrator to add, delete or update schedules
Lists all the schedules configured in the Aspire
GET /aspire/_api/schedules
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
|
Response
{ "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
Response code | Description |
---|---|
200 | Success |
Lists schedules configured in the Aspire, filtered by a specified criteria
POST /aspire/_api/schedules/getAll
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
|
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
filter | JSON | Required | Filters retrieved credentials. Check the filter definition here |
Response
{ "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
Response code | Description |
---|---|
200 | Success |
Get information about a single schedule configured in Aspire
GET /aspire/_api/schedules/:id
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The id of the schedule to return |
Response
{ "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 |
Add schedules to Aspire
POST /aspire/_api/schedules
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
type | string | Required | The type of schedule to add
|
description | string | Optional | 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
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
{ "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
Response code | Description |
---|---|
201 | Created |
406 | Not acceptable - there was an issue validating the input |
Update schedules in Aspire.
PUT /aspire/_api/schedules
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 |
Other parameters passed in the request body will depend on the type of schedule being created - see Add schedule(s) above
Example
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
{ "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
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 |
Delete multiple schedules from Aspire, filtered by a specified criteria
POST /aspire/_api/schedules/deleteAll
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
filter | JSON | Required | Filters retrieved credentials. Check the filter definition here |
Response
{ "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
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 |
Delete a single schedule from Aspire.
DELETE /aspire/_api/schedule/:id
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier(s) of the schedule(s) to delete |
Example
DELETE /aspire/_api/schedule/AAABcID5GBc%3D
Response
{ "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 |
Some endpoint queries require a filter. A filter is basically a JSON object with the following format:
Credentials filter:
"filter" : { "ids" : ["id1", "id2", "id3"], "type" : "TYPE", "description" : "DESCRIPTION", "running": "true|false" }