Difference between revisions of "Zaqar/specs/api/v1/responsecodes"
< Zaqar | specs/api/v1
Line 124: | Line 124: | ||
| Request an expired message || | | Request an expired message || | ||
|- | |- | ||
+ | |} | ||
+ | |||
+ | === '''Post Message(s)''' === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! 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 || | ||
+ | |- | ||
+ | |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 || | ||
+ | |- | ||
+ | |Post without TTL in request body|| | ||
+ | |- | ||
+ | |Post without body in request body|| | ||
+ | |- | ||
+ | |Post with no request body|| | ||
+ | |- | ||
+ | |||
|} | |} |
Revision as of 16:43, 25 March 2013
In all cases, the response body will have an error message appropriate to the scenario
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 | What does Swift do? | |
Request with non boolean value for metadata | 400 |
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 | 404 |
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) | 400 |
Request message with limit >100 | |
Request message with limit <= 0 | 400 |
Request message with non existing marker | |
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) | 400 |
Request message with limit >100 | |
Request message with limit <= 0 | 400 |
Request message with non existing marker |
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 |
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 | |
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 | |
Post without TTL in request body | |
Post without body in request body | |
Post with no request body |