From d37da7d1c5bd24b679fccabd9d6e54beb5c854c4 Mon Sep 17 00:00:00 2001 From: Alex Rudyy Date: Sat, 14 Mar 2015 00:40:45 +0000 Subject: QPID-6449: [Java Broker] Change REST interfaces to return 422 status code from create/update requests when provided attribute values are invalid or required attributes are missing git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1666625 13f79535-47bb-0310-9956-ffa450edef68 --- .../Java-Broker-Management-Channel-REST-API.xml | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) (limited to 'qpid/doc/book') diff --git a/qpid/doc/book/src/java-broker/management/channels/Java-Broker-Management-Channel-REST-API.xml b/qpid/doc/book/src/java-broker/management/channels/Java-Broker-Management-Channel-REST-API.xml index 454de8cac2..9bddafa6fc 100644 --- a/qpid/doc/book/src/java-broker/management/channels/Java-Broker-Management-Channel-REST-API.xml +++ b/qpid/doc/book/src/java-broker/management/channels/Java-Broker-Management-Channel-REST-API.xml @@ -495,6 +495,97 @@ +
+ HTTP status codes returned by REST interfaces + + HTTP status codes returned by REST interfaces + + + + Status code + Description + + + + + + 200 + + + REST request is successfully completed. This status code can be returned by update, delete and get requests. + + + + + 201 + + + New configured object is created. It is returned by REST PUT and POST requests for creation of configured objects. + + + + + 400 + + + REST request cannot be performed due to errors in request. + It can be returned from create, update and delete requests. + The details of a problem are provided in the response payload in json format. + + + + + 401 + + + The request requires user authentication + + + + + 403 + + + Execution of request is not allowed due to failure to authorize user operation. + + + + + 404 + + + + The requested configured object cannot be found. This status code can be returned from POST update requests if configured object does not exist. + The reason for the status code is provided in the response payload in json format. + + + + + + 409 + + + The request can not be performed because its execution can create conflicts in the broker. + This status code can be returned from POST/PUT create requests against parent URI if configured object with requested name or id already exists. + The status code 409 can also be returned if removal or update of configured object can violate system integrity. + The reason for the status code is provided in the response payload in json format. + + + + + + 422 + + + The request can not be performed because provided information either incomplete or invalid. + This status code can be returned from create or update requests. + The reason for the status code is provided in the response payload in json format. + + + + +
+
Examples of REST requests with curl -- cgit v1.2.1