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 schedule API provides functionality that allows a administrator to add, delete or update schedules

Table of Contents

Section

List schedules

Lists all the schedules configured in the Aspire

Panel
borderColorblack
bgColor#fafafb
GET /aspire_api/schedule

Query String Parameters

NameTypeRequiredDescription
typestringOptionalFilter returned schedules to only those with the given type
descriptionstringOptionalFilter returned schedules to only those whose description matches the given expression

Response

Code Block
languagejs
{
  "schedule": [{
    "id": "AAABcID5GBc=",
    "type": "time",
    "description": "Weekly seeds"
    "running": false,
    "enabled": true,
    "time": {
      "scheduleType": "weekly",
      "schedule": "* * * * 1",
      "last": 123456789,
      "next": 123456789,
    },
    "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
  },
  {
    "id": "AAABcIueWUc=",
    "type": "sequential",
    "description": "Rollup"
    "running": false,
    "enabled": false,
    "sequence": {
      "after": "AAABcID5GBc=",
      "last": 123456789,
    },
    "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
  },
    ...
  }],
  "message": "optional response message"
}

Status

Response codeDescription
200Success




Section

Get a single schedule

Get information about a single schedule configured in Aspire

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/schedule?id=:id

GET /aspire_api/schedule/:id

Query String and Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the schedule to return

Response

Code Block
languagejs
{
  "schedule": {
    "id": "AAABcID5GBc=",
    "type": "time",
    "description": "Weekly seeds"
    "running": false,
    "enabled": true,
    "time": {
      "scheduleType": "weekly",
      "schedule": "* * * * 1",
      "last": 123456789,
      "next": 123456789,
    },
    "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
  },
  "message": "optional response message"
}

Status

Response codeDescription
200Success
404The given schedules id was not found




Section

Add schedule(s)

Add one or more schedules to Aspire

Panel
borderColorblack
bgColor#fafafb
POST /aspire_api/schedule

Request Body Parameters

NameTypeRequiredDescription
typestringRequired

The type of schedule to add

  • time
  • sequence
descriptionstringOptionalAn optional description of the schedule

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

NameDescription
enabledWhether this schedule is enabled or not
scheduleType

The type of the time based schedule

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

Examples

Add a single schedule

Code Block
languagejs
{
  "type": "time",
  "description": "Weekly seeds"
  "enabled": true,
  "scheduleType": "weekly",
  "schedule": "* * * * 1",
  "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
}

Add multiple schedules

Code Block
languagejs
[{
  "type": "time",
  "description": "Weekly seeds"
  "enabled": true,
  "scheduleType": "weekly",
  "schedule": "* * * * 1",
  "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
},
{
  "type": "sequence",
  "description": "Rollup"
  "enabled": false,
  "after": "* * * * 1",
  "seed": ["AAABcIudWUd=", "AAABcIudWUe="]
}]

Response

Code Block
languagejs
{
  "schedule": [{
    "id": "AAABcIueWU0",
    "type": "time",
    "description": "Weekly seeds"
    "enabled": true,
    "scheduleType": "weekly",
    "schedule": "* * * * 1",
    "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
   },
   {
    "id": "AAABcIueWU1",
    "type": "sequence",
    "description": "Rollup"
    "enabled": false,
    "after": "* * * * 1",
    "seed": ["AAABcIudWUd=", "AAABcIudWUe="]
 }],

  "message": "optional response message"
}

Status

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




Section

Update schedule(s)

Update one or more schedules in Aspire. Updates will be treated as partial updates rather than overwrites. If a field is not present in the input, any previous value will remain after the update. If you wish to "delete" a value, pass a value of null

Panel
borderColorblack
bgColor#fafafb
PUT /aspire_api/schedule

Request 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 Schedule API above

Examples

Update a single schedule

Code Block
languagejs
{
  "id": "AAABcIueWU0",
  "type": "time",
  "description": "Weekly seeds"
  "enabled": true,
  "scheduleType": "weekly",
  "schedule": "* * * * 1",
  "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
}

Update multiple schedules

Code Block
languagejs
[{
  "id": "AAABcIueWU0",
  "type": "time",
  "description": "Weekly seeds"
  "enabled": true,
  "scheduleType": "weekly",
  "schedule": "* * * * 1",
  "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
},
{
  "id": "AAABcIueWU1",
  "type": "sequence",
  "description": "Rollup"
  "enabled": false,
  "after": "* * * * 1",
  "seed": ["AAABcIudWUd=", "AAABcIudWUe="]
}]

Response

Code Block
languagejs
{
  "schedule": [{
    "id": "AAABcIueWU0",
    "type": "time",
    "description": "Weekly seeds"
    "enabled": true,
    "scheduleType": "weekly",
    "schedule": "* * * * 1",
    "seed": ["AAABcIueWUd=", "AAABcIueWUe="]
   },
   {
    "id": "AAABcIueWU1",
    "type": "sequence",
    "description": "Rollup"
    "enabled": false,
    "after": "* * * * 1",
    "seed": ["AAABcIudWUd=", "AAABcIudWUe="]
    }],

  "message": "optional response message"
}

Status

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




Section

Delete schedule(s)

Delete one or more schedules from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire_api/schedule?id=:id

DELETE /aspire_api/schedule/:id

DELETE /aspire_api/schedule

Query String, Path and Request Body Parameters

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

Examples

Delete a single schedule

Code Block
languagejs
{
  "id": "AAABcID5GBc="
}

Delete multiple schedules

Code Block
languagejs
[{
  "id": "AAABcID5GBc="
},
{
  "id": "AAABcIueWUc="
}]

Delete multiple schedules (alternative form)

Code Block
languagejs
{
  "id": ["AAABcID5GBc=", "AAABcIueWUc="]
}

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