Jump to: navigation, search

Difference between revisions of "Zaqar/devguide/getHomeDocument"

(Created page with "'''Get Home Document''' Template: GET /v1 Normal Response Code(s): 200 This operation gets the home document. The entire API is discoverable from a single starting point - ...")
 
Line 7: Line 7:
 
This operation gets the home document. The entire API is discoverable from a single starting point - the home document. You do not need to know any more than this one URI in order to explore the entire API. This document is cacheable. The home document lets you write clients using a "follow-your-nose" style so clients do not have to construct their own URLs. You can click through and view the JSON doc in your browser.  
 
This operation gets the home document. The entire API is discoverable from a single starting point - the home document. You do not need to know any more than this one URI in order to explore the entire API. This document is cacheable. The home document lets you write clients using a "follow-your-nose" style so clients do not have to construct their own URLs. You can click through and view the JSON doc in your browser.  
  
See also: [http://%20See%20also:%20http://tools.ietf.org/html/draft-nottingham-json-home-02%20  See also: http://tools.ietf.org/html/draft-nottingham-json-home-02 ]
+
See also: http://tools.ietf.org/html/draft-nottingham-json-home-02
  
 
Example Request:
 
Example Request:
Line 149: Line 149:
 
     }
 
     }
 
}
 
}
 
 
 
See also: http://tools.ietf.org/html/draft-nottingham-json-home-02
 

Revision as of 19:41, 19 August 2013

Get Home Document

Template: GET /v1

Normal Response Code(s): 200

This operation gets the home document. The entire API is discoverable from a single starting point - the home document. You do not need to know any more than this one URI in order to explore the entire API. This document is cacheable. The home document lets you write clients using a "follow-your-nose" style so clients do not have to construct their own URLs. You can click through and view the JSON doc in your browser.

See also: http://tools.ietf.org/html/draft-nottingham-json-home-02

Example Request:

GET /v1 HTTP/1.1 Host: marconi.example.com

Example Response:

HTTP/1.0 200 OK Cache-Control: max-age=86400 Content-Length: 4345 Content-Type: application/json-home Date: Tue, 06 Aug 2013 16:31:48 GMT Server: WSGIServer/0.1 Python/2.7.3

{

   "resources": {
       "http://docs.openstack-marconi.org/rel/queues": {
           "href-template": "/queues{?marker,limit,detailed}", 
           "href-vars": {
               "marker": "http://docs.openstack-marconi.org/param/marker", 
               "detailed": "http://docs.openstack-marconi.org/param/detailed", 
               "limit": "http://docs.openstack-marconi.org/param/queue_limit"
           }, 
           "hints": {
               "allow": [
                   "GET"
               ], 
               "formats": {
                   "application/json": {}
               }
           }
       }, 
       "http://docs.openstack-marconi.org/rel/queue-stats": {
           "href-template": "/queues/{queue_name}/stats", 
           "href-vars": {
               "queue_name": "http://docs.openstack-marconi.org/param/queue_name"
           }, 
           "hints": {
               "allow": [
                   "GET"
               ], 
               "formats": {
                   "application/json": {}
               }
           }
       }, 
       "http://docs.openstack-marconi.org/rel/post-messages": {
           "href-template": "/v1/queues/{queue_name}/messages", 
           "href-vars": {
               "queue_name": "http://docs.openstack-marconi.org/param/queue_name"
           }, 
           "hints": {
               "accept-post": [
                   "application/json"
               ], 
               "allow": [
                   "POST"
               ], 
               "formats": {
                   "application/json": {}
               }
           }
       }, 
       "http://docs.openstack-marconi.org/rel/queue": {
           "href-template": "/queues/{queue_name}", 
           "href-vars": {
               "queue_name": "http://docs.openstack-marconi.org/param/queue_name"
           }, 
           "hints": {
               "allow": [
                   "PUT", 
                   "DELETE"
               ], 
               "formats": {
                   "application/json": {}
               }
           }
       }, 
       "http://docs.openstack-marconi.org/rel/messages": {
           "href-template": "/queues/{queue_name}/messages{?marker,limit,echo,include_claimed}", 
           "href-vars": {
               "marker": "http://docs.openstack-marconi.org/param/marker", 
               "include_claimed": "http://docs.openstack-marconi.org/param/include_claimed", 
               "queue_name": "http://docs.openstack-marconi.org/param/queue_name", 
               "limit": "http://docs.openstack-marconi.org/param/messages_limit", 
               "echo": "http://docs.openstack-marconi.org/param/echo"
           }, 
           "hints": {
               "allow": [
                   "GET"
               ], 
               "formats": {
                   "application/json": {}
               }
           }
       }, 
       "http://docs.openstack-marconi.org/rel/claim": {
           "href-template": "/v1/queues/{queue_name}/claims{?limit}", 
           "href-vars": {
               "queue_name": "http://docs.openstack-marconi.org/param/queue_name", 
               "limit": "http://docs.openstack-marconi.org/param/claim_limit"
           }, 
           "hints": {
               "accept-post": [
                   "application/json"
               ], 
               "allow": [
                   "POST"
               ], 
               "formats": {
                   "application/json": {}
               }
           }
       }, 
       "http://docs.openstack-marconi.org/rel/health": {
           "href": "/health", 
           "hints": {
               "allow": [
                   "GET", 
                   "HEAD"
               ]
           }
       }, 
       "http://docs.openstack-marconi.org/rel/queue-metadata": {
           "href-template": "/queues/{queue_name}/metadata", 
           "href-vars": {
               "queue_name": "http://docs.openstack-marconi.org/param/queue_name"
           }, 
           "hints": {
               "allow": [
                   "GET", 
                   "PUT"
               ], 
               "formats": {
                   "application/json": {}
               }
           }
       }
   }

}