Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning
titlePage 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

Table of Contents

Section

Get all schedules

Lists all the schedules configured in the Aspire

Panel
borderColorblack
bgColor#fafafb
GET /aspire/_api/schedules

Pagination query string parameters

Section

Get all schedules, filtered

Lists schedules configured in the Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/schedules/getAll

Pagination query string parameters

Common filter

Response TODO: check this schedule format

Code Block
languagejs
{
  "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 codeDescription
200Success
Section

Get all schedules, filtered

Lists schedules configured in the Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/schedules/getAll

Pagination query string parameters

Common filter

: 200





Get a single schedule

: 200, 404

Section

Get

Section

Get a single schedule

Get information about a single schedule configured in Aspire

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/schedules/:id


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the schedule to return

Query String Parameters

Name
TypeRequiredDescription
expandstringOptionalList of fields to expand, * will expand everything


ResponseResponse TODO: check this schedule format

Code Block
languagejs
{
  "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 codeDescription
200Success
404The given schedules id was not found




Not acceptable - there was an issue validating the input

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

Add

schedules

schedule(s)

Add schedules to Aspire

Panel
borderColorblack
bgColor#fafafb
POST /aspire/_api/schedules


Body Parameters TODO: check the schedule format

NameTypeRequiredDescription
typestringRequired

The type of schedule to add

  • "time"
  • "sequence"
descriptionstringRequiredAn optional description of the schedule
actionstringOptional

The action to perform by the scheduled task

  • "start"
  • "stop"
  • "pause"
  • "resume"
crawlTypestringOptional

The type of crawl to perform by the scheduled task

  • "full"
  • "incremental"
  • "cache groups"

Other parameters passed in the request body will depend on the type of schedule being created. Some candidates are shown below:

NameTypeRequiredDescription
enabledbooleanOptionalWhether this schedule is enabled or not
scheduleTypestringOptional

The type of the time based schedule

  • "hourly"
  • "daily"
  • "weekly"
  • "monthly"
  • "custom"
schedulestringOptionalthe cron like schedule for a time based schedule
afterstringOptionalthe id of the schedule after which this schedule should run (for a sequence based schedule)
seedstringOptionalthe seed(s) this schedule applies to


Example TODO: check the schedule format

Code Block
languagejs
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

Code Block
languagejs
{
  "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 codeDescription
201Created
406




Section

Update schedule(s)

Update schedules in Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/schedules/:id

PUT /aspire/_api/schedules

Note
The existing document will be replaced by the new one provided in the body


Path Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the schedule to update


Body Parameters

typestring
NameTypeRequiredDescription
idThe type of scheduledescriptionstringOptionalRequiredThe identifier An optional description 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

Code Block
languagejs
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

Code Block
languagejs
{
  "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



Section

Update schedules, filtered

Update schedules configured in the Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/schedules/updateAll

Common filter

Update body parameter


Response

Code Block
Description
language
200Success
404Not found - a given schedule identifier was not found
406Not acceptable - there was an issue validating the input
js
{
  "message": "update result response message"
}

Status: 200, 406


Filters retrieved schedules. Check the filter definition here

Common filter


Response

Section

Delete multiple schedules, filtered

Delete multiple schedules from Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/schedules/deleteAll

Body Parameters

NameTypeRequiredDescription
filterJSONRequired
Code Block
languagejs
{
  "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 codeDescription200Success404Not found - a given credential identifier was not found406Not acceptable - there was an issue validating the input Section

Status: 200



Not acceptable - there was an issue validating the input

: 200, 404, 406

Section

Delete schedules(s)

Delete one or more schedules

Delete single schedule

Delete a single schedule from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/scheduleschedules/:id

DELETE /aspire/_api/schedules

POST /aspire/_api/schedules/delete


Path Parameters and Query parameters

NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the schedule(s) to delete


Body Parameter

NameTypeRequiredDescription
idsstringRequiredThe identifier(s) of the schedule(s) to delete


ExamplesExample

Code Block
languagejs
DELETE /aspire/_api/schedules/AAABcID5GBc

DELETE /aspire/_api/schedules?id=AAABcID5GBc&id=AAABcID5GBd

POST /aspire/_api/schedule/AAABcID5GBc%3Dschedules/delete
{
  "ids":["AAABcID5GBc","AAABcID5GBd"]
}


Response

Code Block
languagejs
{
  "message": "optionaldelete result response message"
}

Status

Response codeDescription
200Success
404Not found - a given schedule identifier was not found
406