Scheduler Service (1.0.0)

Download OpenAPI specification:

Andriy Kornatskyy: andriy.kornatskyy@live.com License: MIT

REST API for the Scheduler Service. This API allows you to create and manage scheduled jobs with flexible scheduling options, retry policies, and comprehensive history tracking.

Features

  • Create and manage job collections to organize related jobs
  • Schedule jobs with cron-like syntax or interval-based schedules
  • Configure retry policies with customizable retry counts and intervals
  • Track job execution history and status
  • Enable/disable jobs and collections dynamically
  • Health check endpoint for service monitoring

collections

Provides operations for creating and managing collections of scheduled jobs.

Retrieves a list of job collections

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Creates a job collection

Request Body schema: application/json
required

a job collection to create

name
required
string [ 3 .. 64 ] characters

Unique name

state
string (State)
Enum: "enabled" "disabled"

Current state (enabled or disabled)

Responses

Request samples

Content type
application/json
{
  • "name": "My New App",
  • "state": "enabled"
}

Response samples

Content type
application/json
"my-new-app"

Retrieves a specified job collection

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-None-Match
string (ETag)
Example: "fde7bculys"

ETag value for conditional requests

Responses

Response samples

Content type
application/json
{
  • "id": "my-app-1",
  • "name": "My App #1",
  • "state": "enabled",
  • "updated": "2026-01-02T10:30:00Z"
}

Updates a job collection

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-Match
string (ETag)
Example: "fde7bculys"

ETag value for optimistic concurrency control

Request Body schema: application/json
required

a job collection to update

name
required
string [ 3 .. 64 ] characters

Unique name

state
string (State)
Enum: "enabled" "disabled"

Current state (enabled or disabled)

Responses

Request samples

Content type
application/json
{
  • "name": "My Updated App",
  • "state": "disabled"
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Deletes a single job collection

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-Match
string (ETag)
Example: "fde7bculys"

ETag value for optimistic concurrency control

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

variables

Provides operations for creating and managing collection-scoped variables.

Retrieves a list of variables

query Parameters
collectionId
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: collectionId=my-app-1

Filter jobs by collection ID (URL-safe characters only, 3-36 chars)

header Parameters
If-None-Match
string (ETag)
Example: "fde7bculys"

ETag value for conditional requests

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Creates a variable

Request Body schema: application/json
required

a variable to create

collectionId
required
string [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$

Unique identifier (URL-safe characters only)

name
required
string [ 3 .. 64 ] characters

Unique name

value
string <= 1024 characters

Variable value

Responses

Request samples

Content type
application/json
{
  • "collectionId": "my-app-1",
  • "name": "WEB_HOST",
  • "value": "localhost:5432"
}

Response samples

Content type
application/json
"db-host"

Retrieves a specified variable

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-None-Match
string (ETag)
Example: "fde7bculys"

ETag value for conditional requests

Responses

Response samples

Content type
application/json
{
  • "id": "db-host",
  • "collectionId": "my-app-1",
  • "name": "WEB_HOST",
  • "value": "localhost:5432",
  • "updated": "2026-01-02T10:00:00Z"
}

Updates a variable

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-Match
string (ETag)
Example: "fde7bculys"

ETag value for optimistic concurrency control

Request Body schema: application/json
required

a variable to update

collectionId
required
string [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$

Unique identifier (URL-safe characters only)

name
required
string [ 3 .. 64 ] characters

Unique name

value
string <= 1024 characters

Variable value

Responses

Request samples

Content type
application/json
{
  • "name": "WEB_HOST",
  • "value": "stage.example.com:8081"
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Deletes a single variable

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-Match
string (ETag)
Example: "fde7bculys"

ETag value for optimistic concurrency control

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

jobs

Provides operations for creating and managing scheduled jobs.

Retrieves a list of jobs

query Parameters
collectionId
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: collectionId=my-app-1

Filter jobs by collection ID (URL-safe characters only, 3-36 chars)

fields
string
Example: fields=status,errorRate

Comma-separated list of additional fields to include (e.g., 'status,errorRate')

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Creates a job

Request Body schema: application/json
required

a job to create

collectionId
required
string [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$

Unique identifier (URL-safe characters only)

name
required
string [ 3 .. 64 ] characters

Unique name

state
string (State)
Enum: "enabled" "disabled"

Current state (enabled or disabled)

schedule
required
string [ 6 .. 64 ] characters

Schedule in cron format or interval notation (e.g., '@every 1h', '0 */2 * * *')

required
object (Action)

Responses

Request samples

Content type
application/json
{
  • "collectionId": "my-app-1",
  • "name": "Send Daily Report",
  • "state": "enabled",
  • "schedule": "0 9 * * *",
  • "action": {
    }
}

Response samples

Content type
application/json
"daily-report"

Retrieves a specified job definition

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-None-Match
string (ETag)
Example: "fde7bculys"

ETag value for conditional requests

Responses

Response samples

Content type
application/json
{
  • "id": "daily-report-job",
  • "collectionId": "my-app-1",
  • "name": "My Task #1",
  • "state": "enabled",
  • "schedule": "@every 1h",
  • "status": "ready",
  • "errorRate": 0.25,
  • "updated": "2026-01-02T10:30:00Z",
  • "action": {
    }
}

Updates a job definition

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-Match
string (ETag)
Example: "fde7bculys"

ETag value for optimistic concurrency control

Request Body schema: application/json
required

a job definition to update

collectionId
required
string [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$

Unique identifier (URL-safe characters only)

name
required
string [ 3 .. 64 ] characters

Unique name

state
string (State)
Enum: "enabled" "disabled"

Current state (enabled or disabled)

schedule
required
string [ 6 .. 64 ] characters

Schedule in cron format or interval notation (e.g., '@every 1h', '0 */2 * * *')

required
object (Action)

Responses

Request samples

Content type
application/json
{
  • "collectionId": "my-app-1",
  • "name": "My Task #1",
  • "state": "enabled",
  • "schedule": "@every 1h",
  • "action": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Deletes a single job definition

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-Match
string (ETag)
Example: "fde7bculys"

ETag value for optimistic concurrency control

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Retrieves a specified job status

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-None-Match
string (ETag)
Example: "fde7bculys"

ETag value for conditional requests

Responses

Response samples

Content type
application/json
{
  • "running": false,
  • "runCount": 157,
  • "errorCount": 39,
  • "lastRun": "2026-01-02T09:00:00Z",
  • "nextRun": "2026-01-02T10:00:00Z"
}

Updates a specified job status (e.g., trigger manual run)

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

header Parameters
If-Match
string (ETag)
Example: "fde7bculys"

ETag value for optimistic concurrency control

Request Body schema: application/json
required

job status update

running
boolean

Indicates whether the job is currently running

Responses

Request samples

Content type
application/json
{
  • "running": true
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

history

Provides operations for managing job history.

Retrieves a list of specified job history

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Deletes a specified job history

path Parameters
id
required
string (ID) [ 3 .. 36 ] characters ^[A-Za-z0-9][A-Za-z0-9_\-]*$
Example: my-job-1

Unique identifier (URL-safe characters only, 3-36 chars)

query Parameters
before
string <date-time> (Timestamp)
Example: before=2026-01-01T00:00:00Z

Delete history entries before this timestamp

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

others

Queries health-related information

Responses

Response samples

Content type
application/json
{
  • "status": "up",
  • "message": "All systems operational"
}