Server API | ||
---|---|---|
![]() |
||
Summary |
The Server API in Orion is not a single monolithic API. Rather Orion defines a series of distinct, standalone APIs for various kinds of tasks. A given server may implement one or more of these APIs, but not necessarily all of them.
All Orion server APIs have common design principles:
All server API requests must include the Orion-Version header. This allows the server to identify what protocol version is being used by the client, and produce appropriate responses for that version of client. This also allows a server to support other protocols for accessing the same resources (such as WebDAV). When the version header is absent, by default all modifying (PUT, POST) operations will fail. GET operations may return a reasonable default HTML response suitable for display in a browser.
When using the Orion Server API, errors are conveyed back to the client via a non-OK error code (4xx or 5xx). The response body contains a representation of a more detailed error status from the server.
Currently only a JSON representation is supported, with the following attributes:
Property | Value | Required |
---|---|---|
HttpCode | Integer HTTP response code | Yes |
Code | Application specific integer response code | No |
Severity | One of "Error", "Warning", "Info", "Cancel", or "Ok" | Yes |
Message | A high level error message | Yes |
DetailedMessage | Detailed error message | No |
Cause | JSON object representation of another status that is the cause of this status (used for exception chaining) | No |
SeeAlso | URL of a page for more information on how to resolve the error | No |
Example:
{ "Severity":"Error", "Code":0, "Message":"This is the error message", "DetailedMessage":"This is the exception message", "HttpCode":500 }
A progress resource has the following attributes:
Property | Value | Required |
---|---|---|
Id | String identifier of the long running operation | Yes |
Message | A message indicating the current operation state | Yes |
Running | A boolean indicating whether the operation has completed | Yes |
PercentComplete | An integer between 0 and 100 indicating what percentage of the operation has completed | Yes |
Location | Once the operation has completed, this is the location of the operation result. While the operation is running this is the location of the progress resource itself. A client can keep getting this location until it becomes the result they are looking for. | No |
Result | Once the operation has completed, this is a status object describing the operation result. Looks like Result.JsonData is what the original GET would have supplied if the task was not needed. While the operation is running, this property is undefined | No |
![]() |
||
Summary |