REST Endpoints

From Obsidian Scheduler
Jump to navigationJump to search

For information on how common behaviour of endpoints, see Common Behaviour below.

The supported endpoints are listed below.

Common Behaviour

  • For GET and DELETE, parameterization is done via request parameters, and not JSON body. Supported parameters are simple and primarily provide search options and simple flags.
  • All non-200 responses will always return a JSON response in the following format. One or more errors may be returned in the errors property.
{ 
    "errors":["Resource not found"]
}
  • If a request does not pass validation or if an action cannot be performed, a 400 status code will be returned. This may happen if required fields are omitted, in an invalid format, or an action cannot be performed in the current context.
  • If a resource with the specified identifier could not be found, a 404 status code will be returned. For example, this would occur if you attempt to load a job with an ID that does not exist.
  • If an incorrect method is used on an endpoint (e.g. DELETE on a job runtime), a 405 status code will be returned.
  • If no valid basic authentication is provided (see REST API), a 401 status code will be returned.
  • If no endpoint exists at the requested path, a 404 status code will be returned.
  • If the Content-Type header of a PUT or POST request is not application/json, a 415 status code will be returned.
  • If the server encounters an unexpected error, a 500 status code will be returned.

Jobs Endpoints

GET a list of jobs

Coming soon...

POST a new job

Coming soon...

GET details of an existing job

Coming soon...

PUT updates to an existing job

Coming soon...

DELETE an existing job

Coming soon...

GET a list of an existing job's schedules

Coming soon...

POST a new schedule to an existing job

Coming soon...

Runtimes Endpoints (i.e. Job History)

GET a list of a job's scheduled runtimes

Coming soon...

POST a new scheduled runtime for an existing job (i.e. submit a one-time or ad hoc run)

Coming soon...

GET a list of scheduled runtimes (supports multiple jobs)

Coming soon...

GET details of an existing scheduled (or completed) job runtime

Coming soon...

POST a resubmission request for a failed job runtime

Coming soon...

Runtime Preview Endpoints

GET a list of runtime previews for an existing job

Coming soon...

GET a list of runtime previews (supports multiple jobs)

Coming soon...

Scheduling Hosts Endpoints

GET a list of known scheduling hosts

Coming soon...

GET details on an existing scheduling host

Coming soon...

PUT updates to an existing scheduling host

Coming soon...