REST Endpoints: Difference between revisions

From Obsidian Scheduler
Jump to navigationJump to search
Created page with "Coming soon."
 
No edit summary
Line 1: Line 1:
Coming soon.
For information on how common behaviour of endpoints, see [[#Common Behaviour|Common Behaviour]] below.
 
The supported endpoints are listed below.
=== Job ===
* GET a list of jobs
* POST a new job
* GET details of an existing job
* PUT updates to an existing job
* DELETE an existing job
* GET a list of an existing job's schedules
* POST a new schedule to an existing job
 
=== Runtimes (i.e. Job History) ===
 
* GET a list of a job's scheduled runtimes
* POST a new scheduled runtime for an existing job (i.e. submit a one-time or ad hoc run)
* GET a list of scheduled runtimes (supports multiple jobs)
* GET details of an existing scheduled (or completed) job runtime
* POST a resubmission request for a failed job runtime
 
=== Runtime Preview  ===
* GET a list of runtime previews for an existing job
* GET a list of runtime previews (supports multiple jobs)
 
=== Scheduling Hosts ===
* GET a list of known scheduling hosts
* GET details on an existing scheduling host
* PUT updates to an existing scheduling host
 
 
==Common Behaviour==
* 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.
<pre>
{
    "errors":["Resource not found"]
}
</pre>
* 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.

Revision as of 03:53, 6 January 2013

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

The supported endpoints are listed below.

Job

  • GET a list of jobs
  • POST a new job
  • GET details of an existing job
  • PUT updates to an existing job
  • DELETE an existing job
  • GET a list of an existing job's schedules
  • POST a new schedule to an existing job

Runtimes (i.e. Job History)

  • GET a list of a job's scheduled runtimes
  • POST a new scheduled runtime for an existing job (i.e. submit a one-time or ad hoc run)
  • GET a list of scheduled runtimes (supports multiple jobs)
  • GET details of an existing scheduled (or completed) job runtime
  • POST a resubmission request for a failed job runtime

Runtime Preview

  • GET a list of runtime previews for an existing job
  • GET a list of runtime previews (supports multiple jobs)

Scheduling Hosts

  • GET a list of known scheduling hosts
  • GET details on an existing scheduling host
  • PUT updates to an existing scheduling host


Common Behaviour

  • 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.