20 RESPONSE SCENARIOS
When a domain type resource is invoked, one of several responses can occur. These can be distinguished by the HTTP status return code
-
200 – Request succeeded, and generated a representation
-
404 – Type or type member not found or not visible
-
405 – Method not valid for the resource
-
406 – Client accepts only media types not generated by resource.
In addition, a 401 code may be returned for any resource if the user’s credentials are invalid (that is, they have not authenticated themselves).
The following table indicates which of these status return codes may be generated for each resource:
Method | Repr. | 200 | 404 | 405 | 406 | |
---|---|---|---|---|---|---|
Domain Types |
GET |
y |
y |
y |
y |
|
Domain Type |
GET |
y |
y |
y |
y |
|
Type Property |
GET |
y |
y |
y |
y |
|
Type Collection |
GET |
y |
y |
y |
y |
|
Type Action |
GET |
y |
y |
y |
y |
|
Type Action Parameter |
GET |
y |
y |
y |
y |
|
Type Action Invoke |
GET |
y |
y |
y |
y |
For a given status code, the specific headers and body returned by these resources vary little between the different resources; this is especially so for the failure scenarios (4xx and 5xx).
This section (§D20) describes all the responses irrespective of resource called. Sections §D21 to §D27 identify the various request/response scenarios for each of the domain type resources. In each case they define the request URL, headers and body, and also identify the standard (success) response headers and body, if any.
20.1 Request succeeded, and generated a representation
20.2 Type or type member not found or not visible
This is the response if a requested type or type member does not exist, or if the object/member exists but is not visible based on the current user’s credentials.