REST API Specification - Custom Job Scheduler Integration
This page includes the following:
REST API Specification
The following REST API calls are available:
- POST to create data
- GET to retrieve data
- PUT to update data
- DELETE to delete data
The API is generally limited to two (2) levels of nested resources to minimize overlap.
Example
You can get Jobs for a Scheduler by calling /schedulers/{schedulerId}/jobs, however to get the Runs for a Job, you call /jobs/{jobId}/runs.
Exception Handling
HTTP Status Codes are generally used to indicate processing results.
Whenever practical and useful, details of the error condition are reported back to the caller as a JSON formatted object.
Common HTTP Status Codes - Usage
-
HTTP 200 - OK: The information you requested should be in the payload
-
HTTP 201 - Created: The request has been fulfilled and resulted in a new resource being created.
-
HTTP 202 - Accepted: The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.
-
HTTP 204 - Empty Response: Everything is OK, however there are no results to return to the caller. Commonly used for "action" type calls to the API.
Note: This is currently not in-use, due to a bug with IE 8 and IE9. Instead, responses will have an HTTP 200 status code, along with some type of payload in the response.
-
HTTP 400 - Bad Request: When a call does not contain valid input or when an API is not yet implemented. See error detail payload for additional information {Error : unexpected JSON format}
-
HTTP 401 - Unauthorized: When a call does not contain valid input or when an API is not yet implemented. See error detail payload for additional information
-
HTTP 404 - Not Found: Returned when the requested resource is not found in AAI.
-
HTTP 422 - Unprocessable Entity: When the call is well formed but the data was incorrect. {Error : Well-formed JSON, bad data}
-
HTTP 500 - Internal Server Error: Something unexpected went wrong on the server side. See error detail payload for additional information
This section includes the following pages: