Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


The schedules API provides functionality that allows a administrator to add, delete or update schedules

Table of Contents

description
Section

Get all schedules

Lists all the schedules configured in the Aspire

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


Query String Parameters

NameTypeRequiredDescription
type
from
string
integerOptional
Filter returned schedules to only those with the given type
Indicates the initial page to be retrieved
sizeintegerOptionalSpecifies the size of results page
sortBystringOptional
Filter returned schedules to only those whose description matches the given expressionrunningbooleanOptional
Field by which results are sorted
sortModestringOptional

Sort mode

  • "asc" for ascending sort,
  • "desc" for descending sort
Filter returned schedules to only running schedules


Response

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

a single schedule

all schedules, filtered

Lists schedules configured in the Aspire, filtered by a specified criteriaGet information about a single schedule configured in Aspire

Panel
borderColorblack
bgColor#fafafb

GET POST /aspire/_api/schedules/:idgetAll


Path Query String Parameters

idstring
NameTypeRequiredDescription
fromintegerRequiredOptionalThe id of the schedule to return

Response

Indicates the initial page to be retrieved
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted
sortModestringOptional

Sort mode

  • "asc" for ascending sort,
  • "desc" for descending sort


Body Parameters

NameTypeRequiredDescription
filterJSONRequiredFilters retrieved credentials. Check the filter definition here


Response

Code Block
languagejs
{
  "credential": [{
Code Block
languagejs
{
  "schedule": {
    "id": "AAABcID5GBc=",
    "type": "time",
    "descriptionid": "Weekend after officeAAABcID5GBc=",
    "runningtype": false,
    "enabledfilesystem": true,
    "seeddescription": ["AAABcIueWUd=", "AAABcIueWUe="]"Sales HD1 credentials",
    "propertiescreated": {1596707252548,
      "actionupdated": 1596707252548,
	"start",
      "crawlType": "incremental",    
  properties": { This will be a dynamic JSON object } 
  },
  {
    "scheduleTypeid": "customAAABcIueWUc=",
      "scheduletype": "* * * * 1filesystem",
      "lastdescription": 123456789 "Sales HD2 credentials",
      "nextcreated": 1234567891596707252548,
  },
  "messageupdated": "optional response message"1596707252548,
	"properties": { This will be a dynamic JSON object }  
  }]
}


Status

The given schedules id was not found
Response codeDescription
200Success404




Section

Get a single schedule

Get information about a single schedule configured in

Add schedules

Add one or more schedules to Aspire

Panel
borderColorblack
bgColor#fafafb
POST

GET /aspire/_api/schedules

/:id


Query String Request Body Parameters

NameTypeRequiredDescription
typeidstringRequiredThe type id of the schedule to addreturntime


Response

sequence
Code Block
description
language
stringOptionalAn optional description of the schedule
js
{
  "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



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

Examples

Add a single schedule

Section

Add schedules

Add schedules to Aspire

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


Body Parameters

NameTypeRequiredDescription
typestringRequired

The type of schedule to add

  • "time"
  • "sequence"
descriptionstringOptionalAn 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

Code Block
languagejs
POST /aspire/_api/schedules
[{
  "type": "time",
  "description": "Weekly seeds"
  "enabled": true,
  "scheduleType": "weekly",
  "schedule": "* * * * 1",
  "seed": ["AAABcIueWUd=", "AAABcIueWUe
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
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
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"
}

Add multiple schedules

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": "incrementalfull"
}]

Response

Code Block
languagejs
{
,
{
  "scheduletype": [{
 "sequence",
   "iddescription": "AAABcIueWU0Rollup",
    "typeenabled": "time"false,
    "descriptionafter": "Weekly* seeds"
* * *  1"enabled": true,
    "scheduleTypeseed": "weekly",
    "schedule": "* * * * 1",
    "seed": ["AAABcIueWUd["AAABcIudWUd=", "AAABcIueWUeAAABcIudWUe="],
    "action": "start",
    "crawlType": "fullincremental"
}]


Response

Code Block
languagejs
{
  "schedule": [   },
   {
    "id": "AAABcIueWU1AAABcIueWU0",
    "type": "sequencetime",
    "description": "RollupWeekly seeds"
    "enabled": true,
    "scheduleType": false"weekly",
    "afterschedule": "* * * * 1",
    "seed": ["AAABcIudWUdAAABcIueWUd=", "AAABcIudWUeAAABcIueWUe="],
    "action": "start",
    "crawlType": "incrementalfull"
   }]
}

Status

Response codeDescription201Created406Not acceptable - there was an issue validating the input
,
   {
    "id": "AAABcIueWU1",
    "type": "sequence",
    "description": "Rollup"
    "enabled": false,
    "after": "* * * * 1",
    "seed": ["AAABcIudWUd=", "AAABcIudWUe="],
    "action": "start",
    "crawlType": "incremental"
 }]
}


Status

Response codeDescription
201Created
406Not acceptable - there was an issue validating the input




Other parameters passed in the request body will depend on the type of schedule being created - see Add schedule(s) above

Examples

Update a single schedule

Section

Update schedules

Update schedules in Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/schedules


Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the schedule to update
typestringRequiredThe type of schedule
descriptionstringOptionalAn 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

Code Block
languagejs
PUT /aspire/_api/schedules
{
  "AAABcIueWU0=": {
    "id": "AAABcIueWU0
Section

Update schedules

Update one or more schedules in Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/schedules/:id

PUT /aspire/_api/schedules

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the schedule to update
typestringRequiredThe type of schedule
descriptionstringOptionalAn optional description of the schedule
Code Block
languagejs
PUT /aspire/_api/schedules/AAABcIueWU0%3D
{
  "id": "AAABcIueWU0=",
  "type": "time",
  "description": "Weekly seeds"
  "enabled": true,
  "scheduleType": "weekly",
  "schedule": "* * * * 1",
  "seed": ["AAABcIueWUd=", "AAABcIueWUe="],
  "action": "start",
  "crawlType": "full"
}

Update multiple schedules

Code Block
languagejs
PUT /aspire/_api/schedules
{
  "AAABcIueWU0=": {
    "id": "AAABcIueWU0",
    "type": "time",
    "description": "Weekly seeds"
    "enabled": true,
    "scheduleType": "weekly",
    "scheduletype": "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
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 codeDescription200Success404Not found - a given schedule identifier was not found406Not acceptable - there was an issue validating the input
   "action": "start",
    "crawlType": "incremental"
    }]
}

Status

Response codeDescription
200Success
404Not found - a given schedule identifier was not found
406Not acceptable - there was an issue validating the input




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
filterJSONRequiredFilters retrieved credentials. Check the filter definition here


Response

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 codeDescription
200Success
404Not found - a given credential identifier was not found
406Not acceptable - there was an issue validating the input




Examples

Delete a single schedule

Section

Delete single schedule

Delete a single schedule from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/schedule/:id


Query String Parameters

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


Example

Code Block
languagejs
DELETE 
Section

Delete schedules

Delete one or more schedules from Aspire.

Panel
borderColorblack
bgColor#fafafb
DELETE
/aspire/_api/schedule/
:id

DELETE /aspire/_api/schedule

Path and Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the schedule(s) to delete
Code Block
languagejs
DELETE /aspire/_api/schedule/AAABcID5GBc%3D

Delete multiple schedules

Code Block
languagejs
DELETE /aspire/_api/schedule?id=AAABcID5GBc%3d&id=AAABcIueWUc%3D
AAABcID5GBc%3D


Response

Code Block
languagejs
{
  "message": "optional response message"
}


Status

Response codeDescription
200Success
404Not found - a given schedule identifier was not found
406Not acceptable - there was an issue validating the input




Not acceptable - there was an issue validating the input
Section

Filters
Anchor
FiltersAnchor
FiltersAnchor

 Some endpoint queries require a filter. A filter is basically a JSON object with the following format:

Credentials filter:Response

Code Block
languagejs
  "filter" : {
    "ids" : ["id1", "id2", "id3"],
    "type" : "TYPE",
    "messagedescription" : "DESCRIPTION"optional
 response message"}
}

Status

Response codeDescription
200Success
404Not found - a given schedule identifier was not found
406
Note
When using delete endpoints, ids in the filter are mandatory.