Scheduling Service API (v1)

Download OpenAPI specification:Download

ScheduledTasks

Manages scheduled tasks.

Adds or updates a scheduled task, and returns the task object. Updates can only change the following properties: IsEnabled, Description, Method, OnBehalfOf, Url, Payload, Tags

Request Body schema:
id
string <uuid>

Gets or sets the unique identifier of the scheduled task.

customerId
string <uuid>

If there is a customer associated with this request, (something that we would like to group on), put the id value in here.

accountId
integer <int32>

If there is an accountId associated with this request, (something that we would like to group on), put the id value in here.

object

A list of free-text metadata that can be used to categorize this scheduled request.

name
required
string [ 8 .. 250 ] characters

The descriptive name of the scheduled request.

description
string [ 0 .. 2000 ] characters

A (optional) more comprehensive description of the scheduled task than the descriptive name, used for business justification or execution notes.

url
required
string [ 0 .. 500 ] characters

The SOA endpoint to hit, which will actually kick off the scheduled task. Do not set this value to a non-SOA Web API endpoint as it will expose the scheduling service's authentication token to the destination server.

method
required
string [ 0 .. 30 ] characters

Specifies the HTTP method that hitting the ErpMaestro.SchedulingService.Common.Models.ScheduledTaskModel.Url endpoint will use; default is GET, but acceptable values include POST, PATCH, PUT, and DELETE.

payload
object

If the ErpMaestro.SchedulingService.Common.Models.ScheduledTaskModel.Method supports a payload (POST, PATCH, PUT) and this is not null, it will be included with the request.

onBehalfOf
string [ 0 .. 250 ] characters

If specified, sets the "On-Behalf-Of" header to the set value. Useful for attributing an action to a specified user.

scheduledExecutionTimestamp
required
string <date-time>

Gets or sets the timestamp of when the scheduled task is to be invoked.

recurrencePattern
string (RecurrencePattern)
Enum: "notRecurring" "hourly" "daily" "weekly" "monthly" "quarterly" "annually" "onWorkDays" "lastDayOfMonth"

Sets a recurrence pattern for when to repeat.

  • NotRecurring - Recurrence is not set for this task.
  • Hourly - Recurs on an hourly basis at the same minutes past the hour as the scheduled execution.
  • Daily - Recurs on a daily basis at the same hour and minutes past the hour as the scheduled execution.
  • Weekly - Recurs on the same day of the week, same hour and same minutes past the hour as the scheduled execution.
  • Monthly - Recurs on the same day of the month, same hour and same minutes past the hour as the scheduled execution.
  • Quarterly - Recurs on the same day of the month, same hour and same minutes past the hour as the scheduled execution,
          but only every 3 months (January, April, July, October).
  • Annually - Recurs on the same month, same day of the month, same hour and same minutes past the hour as the scheduled execution,
          once per year.
  • OnWorkDays - Recurs on each working day (Monday, Tuesday, Wednesday, Thursday, Friday)
  • LastDayOfMonth - Recurs on each last day of month
isEnabled
boolean

Gets or sets the enabled state of the scheduled task. Default !:true. A disabled task will not execute.

lastExecution
string <date-time>

Responses

Request samples

Content type
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
  • "accountId": 0,
  • "tags": {
    },
  • "name": "stringst",
  • "description": "string",
  • "url": "string",
  • "method": "string",
  • "payload": { },
  • "onBehalfOf": "string",
  • "scheduledExecutionTimestamp": "2019-08-24T14:15:22Z",
  • "recurrencePattern": "notRecurring",
  • "isEnabled": true,
  • "lastExecution": "2019-08-24T14:15:22Z"
}

Response samples

Content type
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
  • "accountId": 0,
  • "tags": {
    },
  • "name": "stringst",
  • "description": "string",
  • "url": "string",
  • "method": "string",
  • "payload": { },
  • "onBehalfOf": "string",
  • "scheduledExecutionTimestamp": "2019-08-24T14:15:22Z",
  • "recurrencePattern": "notRecurring",
  • "isEnabled": true,
  • "lastExecution": "2019-08-24T14:15:22Z"
}

Deletes a scheduled task. This endpoint can only be executed by a service account

path Parameters
scheduledTaskId
required
string <uuid>

Responses

Response samples

Content type
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
  • "accountId": 0,
  • "tags": {
    },
  • "name": "stringst",
  • "description": "string",
  • "url": "string",
  • "method": "string",
  • "payload": { },
  • "onBehalfOf": "string",
  • "scheduledExecutionTimestamp": "2019-08-24T14:15:22Z",