Difference between revisions of "Zaqar/specs/api/v1/responsecodes"
< Zaqar | specs/api/v1
Line 42: | Line 42: | ||
|- | |- | ||
| Request with non boolean value for metadata || 400 || lowercase true/false? | | Request with non boolean value for metadata || 400 || lowercase true/false? | ||
− | + | |- | |
+ | Header has Accept != "application/json" || 406 | ||
+ | |- | ||
|} | |} | ||
=== '''Set Queue Metadata ''' === | === '''Set Queue Metadata ''' === | ||
− | '''same as create queue | + | '''same as create queue ''' |
− | |||
− | |||
=== '''Get Queue Metadata ''' === | === '''Get Queue Metadata ''' === | ||
Line 57: | Line 57: | ||
|- | |- | ||
| Request metadata for a non existing queue || 404 | | Request metadata for a non existing queue || 404 | ||
+ | |- | ||
+ | Header has Accept != "application/json" || 406 | ||
+ | |- | ||
+ | Header has missing fields || 400 | ||
+ | |- | ||
+ | Header has invalid auth token|| 401 | ||
+ | |- | ||
+ | URL has invalid params ||200 | ||
|- | |- | ||
|} | |} | ||
Line 66: | Line 74: | ||
|- | |- | ||
| Request stats for a non existing queue || 404 | | Request stats for a non existing queue || 404 | ||
+ | |- | ||
+ | Header has Accept != "application/json" || 406 | ||
+ | |- | ||
+ | Header has missing fields || 400 | ||
+ | |- | ||
+ | Header has invalid auth token|| 401 | ||
+ | |- | ||
+ | URL has invalid params ||200 | ||
|- | |- | ||
|} | |} | ||
Line 75: | Line 91: | ||
|- | |- | ||
| Delete a non existing queue || 204 <ref name="ref1"/> | | Delete a non existing queue || 204 <ref name="ref1"/> | ||
+ | |- | ||
+ | Header has Accept != "application/json" || 406 | ||
+ | |- | ||
+ | Header has missing fields || 400 | ||
+ | |- | ||
+ | Header has invalid auth token|| 401 | ||
+ | |- | ||
+ | URL has invalid params ||200 | ||
|- | |- | ||
|} | |} | ||
Line 85: | Line 109: | ||
| Request message from a non existing queue || 404 | | Request message from a non existing queue || 404 | ||
|- | |- | ||
− | | Request message with invalid param (something other than marker,limit,echo) || | + | | Request message with invalid param (something other than marker,limit,echo) || 200 |
|- | |- | ||
| Request message with limit >100 || | | Request message with limit >100 || | ||
Line 95: | Line 119: | ||
| Request message with non boolean value for echo || 400 | | Request message with non boolean value for echo || 400 | ||
|- | |- | ||
− | + | Header has Accept != "application/json" || 406 | |
+ | |- | ||
+ | Header has missing fields || 400 | ||
+ | |- | ||
+ | Header has invalid auth token|| 401 | ||
+ | |- | ||
|} | |} | ||
Line 105: | Line 134: | ||
| Request actions for a non existing queue || 404 | | Request actions for a non existing queue || 404 | ||
|- | |- | ||
− | | Request actions with invalid param (something other than marker,limit) || | + | | Request actions with invalid param (something other than marker,limit) || 200 |
|- | |- | ||
| Request message with limit >100 || | | Request message with limit >100 || | ||
Line 112: | Line 141: | ||
|- | |- | ||
| Request message with non existing marker || 204 <ref name="ref2"/> | | Request message with non existing marker || 204 <ref name="ref2"/> | ||
+ | |- | ||
+ | Header has Accept != "application/json" || 406 | ||
+ | |- | ||
+ | Header has missing fields || 400 | ||
+ | |- | ||
+ | Header has invalid auth token|| 401 | ||
|- | |- | ||
|} | |} | ||
Line 125: | Line 160: | ||
|- | |- | ||
| Request an expired message || 404 | | Request an expired message || 404 | ||
+ | |- | ||
+ | Header has Accept != "application/json" || 406 | ||
+ | |- | ||
+ | Header has missing fields || 400 | ||
+ | |- | ||
+ | Header has invalid auth token|| 401 | ||
+ | |- | ||
+ | URL has invalid params ||200 | ||
|- | |- | ||
|} | |} | ||
Line 157: | Line 200: | ||
|Post with no request body|| 400 | |Post with no request body|| 400 | ||
|- | |- | ||
− | + | Header has Accept != "application/json" || 406 | |
+ | |- | ||
+ | Header has missing fields || 400 | ||
+ | |- | ||
+ | Header has invalid auth token|| 401 | ||
+ | |- | ||
+ | URL has invalid params ||200 | ||
+ | |- | ||
|} | |} | ||
Line 173: | Line 223: | ||
| Delete with non existing claim_id || | | Delete with non existing claim_id || | ||
|- | |- | ||
− | | | + | Header has Accept != "application/json" || 406 |
+ | |- | ||
+ | Header has missing fields || 400 | ||
+ | |- | ||
+ | Header has invalid auth token|| 401 | ||
+ | |- | ||
+ | URL has invalid params ||200 | ||
|- | |- | ||
|} | |} | ||
Line 198: | Line 254: | ||
|- | |- | ||
| Claim message with missing header fields || 400 | | Claim message with missing header fields || 400 | ||
+ | |- | ||
+ | Header has Accept != "application/json" || 406 | ||
|- | |- | ||
|} | |} | ||
Line 215: | Line 273: | ||
|- | |- | ||
| Query Claim with non existing claim_id || | | Query Claim with non existing claim_id || | ||
+ | |- | ||
+ | Header has Accept != "application/json" || 406 | ||
|- | |- | ||
|} | |} | ||
Line 257: | Line 317: | ||
|- | |- | ||
| Release Claim with missing header fields || 400 | | Release Claim with missing header fields || 400 | ||
+ | |- | ||
+ | Header has Accept != "application/json" || 406 | ||
|- | |- | ||
|} | |} |
Revision as of 15:18, 26 March 2013
- In all cases, the response body will have an error message appropriate to the scenario
- Any http operation , other than the specified will return a 404 (?)
Contents
Create Queue
Error Scenario | HTTP Response Code |
---|---|
Request Body is Empty | 400 |
Request Body has toplevel field starting with underscore | 400 |
Request header has missing fields | 400 |
Request header has invalid auth token | 401 |
Request header has Accept != "application/json" | 406 |
Request body is >4KB | 400 |
Request body has malformed JSON | 400 |
Queue has a long name (>512 bytes) | 400 |
List Queues
Error Scenario | HTTP Response Code | Notes |
---|---|---|
Request a non existing queue | 404 | |
URL has invalid param (something other than limit,marker,metadata) | 200 | Extra params are ignored. |
Request with negative value for limit | 400 | |
Request with zero value for limit | 400 | |
Request with non existing value of marker | 204 [1] | What does Swift do? |
Request with non boolean value for metadata | 400 | lowercase true/false? |
Set Queue Metadata
same as create queue
Get Queue Metadata
Error Scenario | HTTP Response Code |
---|---|
Request metadata for a non existing queue | 404 |
Get Queue Stats
Error Scenario | HTTP Response Code |
---|---|
Request stats for a non existing queue | 404 |
Delete Queue
Error Scenario | HTTP Response Code |
---|---|
Delete a non existing queue | 204 [2] |
Get Messages
Error Scenario | HTTP Response Code |
---|---|
Request message from a non existing queue | 404 |
Request message with invalid param (something other than marker,limit,echo) | 200 |
Request message with limit >100 | |
Request message with limit <= 0 | 400 |
Request message with non existing marker | 204 [1] |
Request message with non boolean value for echo | 400 |
Get Actions
Error Scenario | HTTP Response Code |
---|---|
Request actions for a non existing queue | 404 |
Request actions with invalid param (something other than marker,limit) | 200 |
Request message with limit >100 | |
Request message with limit <= 0 | 400 |
Request message with non existing marker | 204 [1] |
Get a Specific Message
Error Scenario | HTTP Response Code |
---|---|
Request message from a non existing queue | 404 |
Request a non existing message | 404 |
Request an expired message | 404 |
Post Message(s)
Error Scenario | HTTP Response Code |
---|---|
Post message to a non existing queue | 404 |
Post > 100 messages with a single request | |
Post with request body > 4KB | |
Post with invalid JSON request body | 400 |
Post with non-JSON request body | |
Post with TTL < 60 | |
Post with TTL > 1209600 | |
Post with non int value of TTL | |
Post with negative value of TTL | same as < 60 |
Post without TTL in request body | 400 |
Post without body in request body | 400 |
Post with no request body | 400 |
Delete Messages
Error Scenario | HTTP Response Code |
---|---|
Delete message from a non existing queue | 204 |
Delete a non existing message | 204 |
Delete with non expired claim_id | |
Delete with non existing claim_id |
Claim Messages
Error Scenario | HTTP Response Code |
---|---|
Claim message from a non existing queue | 404 |
Claim message with invalid value for limit (nonint, <=0, >100) | |
Claim message with no request body | 400 |
Claim message with no TTL field | |
Claim message with invalid TTL value (non int, <=0) | |
Claim message with invalid JSON | |
Claim message with non JSON request body | |
Claim message with invalid auth token | 401 |
Claim message with missing header fields | 400 |
Query Claim
Error Scenario | HTTP Response Code |
---|---|
Query Claim from a non existing queue | 404 |
Query Claim with invalid auth token | 401 |
Query Claim with missing header fields | 400 |
Query Claim with invalid URL params | |
Query Claim with non existing claim_id |
Update Claim
Error Scenario | HTTP Response Code |
---|---|
Update Claim on a non existing queue | 404 |
Update a non existing claim | 404 |
Update claim with invalid URL params | |
Update claim with content-type != application/json-patch | |
Update claim with no request body | 400 |
Update claim with invalid JSON in request body | 400 |
Update claim with non JSON request body | |
Update Claim with invalid auth token | 401 |
Update Claim with missing header fields | 400 |
Update Claim with invalid URL params |
Release Claim
Error Scenario | HTTP Response Code |
---|---|
Release Claim from a non existing queue | 404 |
Release a non existing claim | 204 |
Release claim with invalid URL params | |
Release Claim with invalid auth token | 401 |
Release Claim with missing header fields | 400 |