adds docs directory with dev guide

Change-Id: I1f2652cc471f3fa39627a63f09fefdd0b9f5bb6b
This commit is contained in:
root 2014-02-07 20:58:20 +00:00 committed by Alejandro Cabrera
parent dc7adefc82
commit 638b79afab
64 changed files with 4340 additions and 1 deletions

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
*~
*.bak
*.DS_Store
target/
*.pyc
*.dat
TAGS

12
doc-test.conf Normal file
View File

@ -0,0 +1,12 @@
[DEFAULT]
repo_name = marconi
api_site=True
file_exception = includewars.xml
# These two options need to come as pairs:
#book=api-quick-start
#target_dir=target/docbkx/webhelp/api-quick-start-onepager-external

2
doc/README.md Normal file
View File

@ -0,0 +1,2 @@
Message-Queuing
===============

49
doc/common/common.ent Normal file
View File

@ -0,0 +1,49 @@
<!ENTITY ndash "&#8211;">
<!ENTITY mdash "&#8212;">
<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'>
<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'>
<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'>
<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'>
<!ENTITY PATCH '<command xmlns="http://docbook.org/ns/docbook">PATCH</command>'>
<!--
A collection of common faults. These are pretty much expected
in every request.
-->
<!ENTITY commonFaults '
<response status="400" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="queues:badRequest"/>
<representation mediaType="application/json"/>
</response>
<response status="401" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="queues:unauthorized"/>
<representation mediaType="application/json"/>
</response>
<response status="406" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="queues:unauthorized"/>
<representation mediaType="application/json"/>
</response>
<response status="429" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="queues:tooManyRequests"/>
<representation mediaType="application/json"/>
</response>
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="queues:serviceUnavailable"/>
<representation mediaType="application/json"/>
</response>'>
<!--
Faults on DELETE
-->
<!ENTITY deleteFaults '
<response status="403" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="queues:forbidden"/>
<representation mediaType="application/json"/>
</response>'>
<!--
Faults on GET
-->
<!ENTITY getFaults '
<response status="404" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="queues:itemNotFound"/>
<representation mediaType="application/json"/>
</response>'>

15
doc/includewars.xml Normal file
View File

@ -0,0 +1,15 @@
<assembly>
<id>includewars</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/target/docbkx/webhelp</directory>
<includes>
<include>**.war</include>
</includes>
</fileSet>
</fileSets>
</assembly>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.openstack.docs</groupId>
<artifactId>parent-pom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>marconi-api-ref</artifactId>
<packaging>jar</packaging>
<name>Message Queuing API v1 Reference</name>
<properties>
<!-- This is set by Jenkins according to the branch. -->
<release.path.name>local</release.path.name>
<comments.enabled>1</comments.enabled>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.rackspace.cloud.api</groupId>
<artifactId>clouddocs-maven-plugin</artifactId>
<executions>
<!-- Configuration for OpenStack Message Queuing API v1 -->
<execution>
<id>generate-webhelp</id>
<goals>
<goal>generate-webhelp</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<includes> os-marconi-apiRef.xml </includes>
<generateToc> appendix toc,title
article/appendix nop
article toc,title
book toc,title,figure,table,example,equation
chapter toc,title
section toc
part toc,title
qandadiv toc
qandaset toc
reference toc,title
set toc,title </generateToc>
<webhelpDirname>marconi-api-ref</webhelpDirname>
<pdfFilenameBase>marconi-api-ref</pdfFilenameBase>
</configuration>
</execution>
</executions>
<configuration>
<enableDisqus>1</enableDisqus>
<enableGoogleAnalytics>0</enableGoogleAnalytics>
<branding>builtforOpenStack</branding>
<showXslMessages>true</showXslMessages>
<chapterAutolabel>1</chapterAutolabel>
<sectionAutolabel>0</sectionAutolabel>
<tocSectionDepth>1</tocSectionDepth>
<formalProcedures>0</formalProcedures>
<highlightSource>false</highlightSource>
<xincludeSupported>true</xincludeSupported>
<sourceDirectory>.</sourceDirectory>
<canonicalUrlBase>http://docs.openstack.org/marconi-api-ref/content/</canonicalUrlBase>
</configuration>
</plugin>
</plugins>
</build>
</project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,68 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.openstack.docs</groupId>
<artifactId>parent-pom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>marconi-get-started</artifactId>
<packaging>jar</packaging>
<name>Message Queuing API v1 Getting Started</name>
<properties>
<!-- This is set by Jenkins according to the branch. -->
<release.path.name>local</release.path.name>
<comments.enabled>1</comments.enabled>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.rackspace.cloud.api</groupId>
<artifactId>clouddocs-maven-plugin</artifactId>
<executions>
<!-- Configuration for OpenStack Message Queuing API v1 -->
<execution>
<id>generate-webhelp</id>
<goals>
<goal>generate-webhelp</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<includes>
os-marconi-apiGettingStarted.xml </includes>
<generateToc> appendix toc,title
article/appendix nop
article toc,title
book toc,title,figure,table,example,equation
chapter toc,title
section toc
part toc,title
qandadiv toc
qandaset to
reference toc,title
set toc,title </generateToc>
<webhelpDirname>marconi-get-started</webhelpDirname>
<pdfFilenameBase>marconi-get-started</pdfFilenameBase>
</configuration>
</execution>
</executions>
<configuration>
<enableDisqus>1</enableDisqus>
<enableGoogleAnalytics>0</enableGoogleAnalytics>
<branding>builtforOpenStack</branding>
<showXslMessages>true</showXslMessages>
<chapterAutolabel>1</chapterAutolabel>
<sectionAutolabel>0</sectionAutolabel>
<tocSectionDepth>1</tocSectionDepth>
<formalProcedures>0</formalProcedures>
<highlightSource>false</highlightSource>
<xincludeSupported>true</xincludeSupported>
<sourceDirectory>.</sourceDirectory>
<canonicalUrlBase>http://docs.openstack.org/marconi-getting-started/content/</canonicalUrlBase>
</configuration>
</plugin>
</plugins>
</build>
</project>

44
doc/pom.xml Normal file
View File

@ -0,0 +1,44 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openstack.docs</groupId>
<artifactId>parent-pom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>marconi-api-ref</module>
<module>marconi-get-started</module>
</modules>
<profiles>
<profile>
<id>Rackspace Research Repositories</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>rackspace-research</id>
<name>Rackspace Research Repository</name>
<url>http://maven.research.rackspacecloud.com/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>rackspace-research</id>
<name>Rackspace Research Repository</name>
<url>http://maven.research.rackspacecloud.com/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>com.rackspace.cloud.api</groupId>
<artifactId>clouddocs-maven-plugin</artifactId>
<version>1.13.0</version>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,691 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application [
<!ENTITY % common SYSTEM "../common/common.ent">
%common;
]>
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:queueapi="http://docs.openstack.org/queue/api/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:dbaas="http://docs.openstack.org/database/api/v1.0"
xmlns:queues="http://docs.openstack.org/database/api/v1.0">
<!--*******************************************************-->
<!-- All Resources -->
<!--*******************************************************-->
<resources base="https://queues.api.openstack.org/"
xml:id="os-marconi-v1">
<resource id="version" path="{version}">
<!-- <remark> Project ID is now in a header, not in the URI. </remark>
<resource id="projectID" path="{projectId}">
<param name="projectId" style="template" type="xsd:string">
<doc>The project ID of the owner of the specified
queue. </doc></param>
</resource>
-->
<method href="#getHomeDocument"/>
<resource id="queues" path="queues">
<method href="#listQueues" />
<resource id="queue" path="{queue_name}">
<param name="queue_name" style="template" type="xsd:string">
<doc>Specifies the name of the queue. </doc></param>
<method href="#createQueue"/>
<method href="#deleteQueue"/>
<method href="#checkQueueExists" />
<resource id="metadata" path="metadata">
<method href="#setQueueMetadata"/>
<method href="#getQueueMetadata"/>
</resource>
<resource id="stats" path="stats">
<method href="#getQueueStats" />
</resource>
<resource id="messages" path="messages">
<method href="#postMessage" />
<method href="#getMessages" />
<method href="#getSetMessagesByID" />
<method href="#deleteMessages" />
<resource id="message" path="{messageId}">
<param name="messageId" style="template" type="xsd:string">
<doc>Specifies the message ID.</doc></param>
<method href="#getSpecificMessage" />
<method href="#deleteMessage" />
</resource>
</resource>
<resource id="claims" path="claims">
<method href="#claimMessages" />
<resource id="claim" path="{claimId}">
<param name="claimId" style="template" type="xsd:string">
<doc>Specifies the claim ID.</doc></param>
<method href="#queryClaim" />
<method href="#updateClaim" />
<method href="#deleteClaim" />
</resource>
</resource>
</resource>
</resource>
</resource>
</resources>
<!--*******************************************************-->
<!-- All Methods -->
<!--*******************************************************-->
<!--*******************************************************-->
<!-- Get Home Document -->
<!--*******************************************************-->
<method name="GET" id="getHomeDocument">
<wadl:doc xml:lang="EN" title="Get Home Document" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Gets the home document.</para>
<para>This operation gets the home document.</para>
<para>The entire API is discoverable from a single starting point, the home document. To explore the entire API, you need to know only this one URI. This document is cacheable.</para>
<para>The home document lets you write clients by using relational links, so clients do not have to construct their own URLs. You can click through and view the JSON doc in your browser.</para>
<para>For more information about home documents, see <link xlink:href="http://tools.ietf.org/html/draft-nottingham-json-home-02"
>http://tools.ietf.org/html/draft-nottingham-json-home-02</link>.</para>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/getHomeDocument_request-http.txt"/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/getHomeDocument_response-http.txt"/>
<xsdxt:code href="../wadl/samples/getHomeDocument_response.json"/>
</doc>
</representation>
</response>
</method>
<!--*******************************************************-->
<!-- Queues Methods -->
<!--*******************************************************-->
<!--*******************************************************-->
<!-- Create Queue: createQueue -->
<!--*******************************************************-->
<method name="PUT" id="createQueue">
<wadl:doc xml:lang="EN" title="Create Queue" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Creates a queue.</para>
<para>This operation creates a new queue.</para>
<para>The body of the request is empty.</para>
<note> <para><code>queue_name</code> is the name that you give to the queue. The name must not exceed 64 bytes in length, and it is limited to US-ASCII letters, digits, underscores, and hyphens.</para>
</note>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/createQueue_request-http.txt"/>
</doc>
</representation>
</request>
<response status="201">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/createQueue_response-http.txt"/>
</doc>
</representation>
</response>
&commonFaults;
</method>
<!--*******************************************************-->
<!-- List Queues: listQueues -->
<!--*******************************************************-->
<method name="GET" id="listQueues" >
<wadl:doc xml:lang="EN" title="List Queues" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Lists queues.</para>
<para>A request to list queues when you have no queues in your account returns 204, instead of 200, because there was no information to send back.</para>
<para>This operation lists queues for the project. The queues are sorted alphabetically by name.</para>
</wadl:doc>
<request>
<param name="marker" style="query" type="xsd:string" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Specifies the name of the last queue received in a previous request, or none to get the first page of results.
</wadl:doc>
</param>
<param name="limit" style="query" type="xsd:integer" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Specifies the number of queues to return. The default value for the number of queues returned is 10. If you do not specify this parameter, the default number of queues is returned.
</wadl:doc>
</param>
<param name="detailed" style="query" type="xsd:boolean" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Determines whether queue metadata is included in the response. The default value for this parameter is <code>false</code>, which excludes the metadata.
</wadl:doc>
</param>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/listQueues_request-http.txt"/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/listQueues_response-http.txt"/>
<xsdxt:code href="../wadl/samples/listQueues_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Set Queue Metadata: setQueueMetadata ***** -->
<!--*******************************************************-->
<method name="PUT" id="setQueueMetadata">
<wadl:doc xml:lang="EN" title="Set Queue Metadata" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Sets metadata for the specified queue.</para>
<para>This operation sets metadata for the specified queue.</para>
<para>The request body has a limit of 256 KB, including whitespace (when re-serialized as JSON).</para>
<para>This operation replaces any existing metadata document in its entirety. Ensure that you do not accidentally overwrite existing metadata that you want to retain.</para>
<para>The body of the request includes contextual information about the way a particular application interacts with the queue. The document must be valid JSON. (The Message Queuing service validates it.)</para>
<note> <para><code>queue_name</code> is the name that you give to the queue. The name must not exceed 64 bytes in length, and it is limited to US-ASCII letters, digits, underscores, and hyphens.</para>
</note>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/setQueueMetadata_request-http.txt"/>
<xsdxt:code href="../wadl/samples/setQueueMetadata_request.json"/>
</doc>
</representation>
</request>
<response status="204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/setQueueMetadata_response-http.txt"/>
</doc>
</representation>
</response>
&commonFaults;
</method>
<!--*******************************************************-->
<!-- Get Queue Metadata: getQueueMetadata ***** -->
<!--*******************************************************-->
<method name="GET" id="getQueueMetadata">
<wadl:doc xml:lang="EN" title="Get Queue Metadata" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Returns metadata for the specified queue.</para>
<para>This operation returns metadata, such as message TTL, for the queue.</para>
<note> <para><code>queue_name</code> is the name that you give to the queue. The name must not exceed 64 bytes in length, and it is limited to US-ASCII letters, digits, underscores, and hyphens.</para>
</note>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/getQueueMetadata_request-http.txt"/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/getQueueMetadata_response-http.txt"/>
<xsdxt:code href="../wadl/samples/getQueueMetadata_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Get Queue Stats: getQueueStats -->
<!--*******************************************************-->
<method name="GET" id="getQueueStats">
<wadl:doc xml:lang="EN" title="Get Queue Stats" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Returns statistics for the specified queue.</para>
<para>This operation returns queue statistics, including how many messages are in the queue, categorized by status.</para>
<note><para>If the value of the <code>total</code> attribute is 0, then <code>oldest</code> and <code>newest</code> message statistics are not included in the response.</para></note>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/getQueueStats_request-http.txt"/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/getQueueStats_response-http.txt"/>
<xsdxt:code href="../wadl/samples/getQueueStats_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Delete Queue: deleteQueue -->
<!--*******************************************************-->
<method name="DELETE" id="deleteQueue">
<wadl:doc xml:lang="EN" title="Delete Queue" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Deletes the specified queue.</para>
<para>This operation immediately deletes a queue and all of its existing messages.</para>
<note> <para><code>queue_name</code> is the name that you give to the queue. The name must not exceed 64 bytes in length, and it is limited to US-ASCII letters, digits, underscores, and hyphens.</para>
</note>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/deleteQueue_request-http.txt"/>
</doc>
</representation>
</request>
<response status="204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/deleteQueue_response-http.txt"/>
</doc>
</representation>
</response>
&commonFaults;
</method>
<!--*******************************************************-->
<!-- Delete Queue: checkQueueExists -->
<!--*******************************************************-->
<method name="GET" id="checkQueueExists">
<wadl:doc xml:lang="EN" title="Check Queue Existence" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Verifies whether the specified queue exists.</para>
<para>This operation verifies whether the specified queue exists.</para>
<para>You can also use HEAD instead of GET for the verb.</para>
<note> <para><code>queue_name</code> is the name that you give to the queue. The name must not exceed 64 bytes in length, and it is limited to US-ASCII letters, digits, underscores, and hyphens.</para>
</note>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/checkQueueExists_request-http.txt"/>
</doc>
</representation>
</request>
<response status="204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/checkQueueExists_response-http.txt"/>
</doc>
</representation>
</response>
&getFaults;
</method>
<!--*******************************************************-->
<!-- Messages Methods -->
<!--*******************************************************-->
<!--*******************************************************-->
<!-- Post Message: postMessage -->
<!--*******************************************************-->
<method name="POST" id="postMessage">
<wadl:doc xml:lang="EN" title="Post Message" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Posts the message or messages for the specified queue.</para>
<para>This operation posts the specified message or messages.</para>
<para>You can submit up to 10 messages in a single request, but you must always encapsulate the messages in a collection container (an array in JSON, even for a single message - without the JSON array, you receive the "Invalid request body" message). The resulting value of the Location header or response body might be used to retrieve the created messages for further processing.</para>
<para>The client specifies only the body and TTL for the message. The server inserts metadata, such as ID and age.</para>
<para>The response body contains a list of resource paths that correspond to each message submitted in the request, in the order of the messages. If a server-side error occurs during the processing of the submitted messages, a partial list is returned, the partial attribute is set to true, and the client tries to post the remaining messages again. If the server cannot enqueue any messages, the server returns a <code>503 Service Unavailable</code> error message.</para>
<para>The <code>body</code> attribute specifies an arbitrary document that constitutes the body of the message being sent.</para>.
<para>The following rules apply for the maximum size:</para>
<itemizedlist spacing="compact">
<listitem>
<para>The maximum size of posted messages is the maximum size of the entire request document (rather than the sum of the individual message body field values as it was in earlier releases). On error, the client will now be notified of how much it exceeded the limit.</para>
</listitem>
<listitem>
<para>The size is limited to 256 KB, including whitespace.</para>
</listitem>
</itemizedlist>
<para>The document must be valid JSON. (The Message Queuing service validates it.)</para>
<para>The <code>ttl</code> attribute specifies how long the server waits before marking the message as expired and removing it from the queue. The value of <code>ttl</code> must be between 60 and 1209600 seconds (14 days). Note that the server might not actually delete the message until its age has reached up to (ttl + 60) seconds, to allow for flexibility in storage implementations.</para>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/postMessage_request-http.txt" />
<xsdxt:code href="../wadl/samples/postMessage_request.json" />
</doc>
</representation>
</request>
<response status="201">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/postMessage_response-http.txt"/>
<xsdxt:code href="../wadl/samples/postMessage_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Get Messages: getMessages -->
<!--*******************************************************-->
<method name="GET" id="getMessages">
<wadl:doc xml:lang="EN" title="Get Messages" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Gets the message or messages in the specified queue.</para>
<para>A request to list messages when the queue is not found or when messages are not found returns 204, instead of 200, because there was no information to send back. Messages with malformed IDs or messages that are not found by ID are ignored.</para>
<para>This operation gets the message or messages in the specified queue.</para>
<para>Message IDs and markers are opaque strings. Clients should make no assumptions about their format or length. Furthermore, clients should assume that there is no relationship between markers and message IDs (that is, one cannot be derived from the other). This allows for a wide variety of storage driver implementations.</para>
<para>Results are ordered by age, oldest message first.</para>
</wadl:doc>
<request>
<param name="marker" style="query" type="xsd:string" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Specifies an opaque string that the client can use to request the next batch of messages. The <code>marker</code> parameter communicates to the server which messages the client has already received. If you do not specify a value, the API returns all messages at the head of the queue (up to the limit).
</wadl:doc>
</param>
<param name="limit" style="query" type="xsd:integer" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">When more messages are available than can be returned in a single request, the client can pick up the next batch of messages by simply using the URI template parameters returned from the previous call in the "next" field.
Specifies up to 10 messages (the default value) to return. If you do not specify a value for the limit parameter, the default value of 10 is used.
</wadl:doc>
</param>
<param name="echo" style="query" type="xsd:boolean" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Determines whether the API returns a client's own messages. The <code>echo</code> parameter is a Boolean value (<code>true</code> or <code>false</code>) that determines whether the API returns a client's own messages, as determined by the <code>uuid</code> portion of the User-Agent header. If you do not specify a value, <code>echo</code> uses the default value of <code>false</code>. If you are experimenting with the API, you might want to set <code>echo=true</code> in order to see the messages that you posted.
</wadl:doc>
</param>
<param name="include_claimed" style="query" type="xsd:boolean" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Determines whether the API returns claimed messages and unclaimed messages. The <code>include_claimed</code> parameter is a Boolean value (<code>true</code> or <code>false</code>) that determines whether the API returns claimed messages and unclaimed messages. If you do not specify a value, <code>include_claimed</code> uses the default value of <code>false</code> (only unclaimed messages are returned).
</wadl:doc>
</param>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/getMessages_request-http.txt"/>
</doc>
</representation>
</request>
<response status="200 204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/getMessages_response-http.txt"/>
<xsdxt:code href="../wadl/samples/getMessages_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Get a Specific Message: getSpecificMessage -->
<!--*******************************************************-->
<method name="GET" id="getSpecificMessage">
<wadl:doc xml:lang="EN" title="Get a Specific Message" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Gets the specified message from the specified queue.</para>
<para>This operation gets the specified message from the specified queue.</para>
<para>If either the message ID is malformed or nonexistent, no message is returned.</para>
<para>Message fields are defined as follows:<itemizedlist><listitem><para><code>href</code> is an opaque relative URI that the client can use to uniquely identify a message resource and interact with it.</para></listitem><listitem><para><code>ttl</code> is the TTL that was set on the message when it was posted. The message expires after (ttl - age) seconds.</para></listitem><listitem><para><code>age</code> is the number of seconds relative to the server's clock.</para></listitem><listitem><para><code>body</code> is the arbitrary document that was submitted with the original request to post the message.</para></listitem></itemizedlist></para>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/getSpecificMessage_request-http.txt"/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/getSpecificMessage_response-http.txt"/>
<xsdxt:code href="../wadl/samples/getSpecificMessage_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Get a Set of Messages by ID: getSetMessagesByID -->
<!--*******************************************************-->
<method name="GET" id="getSetMessagesByID">
<wadl:doc xml:lang="EN" title="Get a Set of Messages by ID" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Gets a specified set of messages from the specified queue.</para>
<para>This operation provides a more efficient way to query multiple messages compared to using a series of individual <command>GET</command>s. Note that the list of IDs cannot exceed 20. If a malformed ID or a nonexistent message ID is provided, it is ignored, and the remaining messages are returned.</para>
<para>Unlike the Get Messages operation, a client's own messages are always returned in this operation. If you use the ids parameter, the echo parameter is not used and is ignored if it is specified.</para>
<para>The message attributes are defined as follows:<itemizedlist><listitem><para><code>href</code> is an opaque relative URI that the client can use to uniquely identify a message resource and interact with it.</para></listitem><listitem><para><code>ttl</code> is the TTL that was set on the message when it was posted. The message expires after (ttl - age) seconds.</para></listitem><listitem><para><code>age</code> is the number of seconds relative to the server's clock.</para></listitem><listitem><para><code>body</code> is the arbitrary document that was submitted with the original request to post the message.</para></listitem></itemizedlist></para>
</wadl:doc>
<request>
<param name="ids" style="query" type="xsd:string" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Specifies the IDs of the messages to get. Format multiple message ID values by separating them with commas (comma-separated).
</wadl:doc>
</param>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/getSetMessagesByID_request-http.txt"/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/getSetMessagesByID_response-http.txt"/>
<xsdxt:code href="../wadl/samples/getSetMessagesByID_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Delete Message: deleteMessage -->
<!--*******************************************************-->
<method name="DELETE" id="deleteMessage">
<wadl:doc xml:lang="EN" title="Delete Message" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Deletes the specified message from the specified queue.</para>
<para>This operation immediately deletes the specified message.</para>
<para>The <code>claim_id</code> parameter specifies that the message is deleted only if it has the specified claim ID and that claim has not expired. This specification is useful for ensuring only one worker processes any given message. When a worker's claim expires before it can delete a message that it has processed, the worker must roll back any actions it took based on that message because another worker can now claim and process the same message.</para>
<para>If you do not specify <code>claim_id</code>, but the message is claimed, the operation fails. You can only delete claimed messages by providing an appropriate <code>claim_id</code>.</para>
</wadl:doc>
<request>
<param name="claim_id" style="query" type="xsd:string" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Identifies the claim.
</wadl:doc>
</param>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/deleteMessage_request-http.txt"/>
</doc>
</representation>
</request>
<response status="204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/deleteMessage_response-http.txt"/>
</doc>
</representation>
</response>
&commonFaults;
&deleteFaults;
</method>
<!--*******************************************************-->
<!-- Delete Messages: deleteMessages -->
<!--*******************************************************-->
<method name="DELETE" id="deleteMessages">
<wadl:doc xml:lang="EN" title="Delete a Set of Messages by ID" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Provides a bulk delete for messages.</para>
<para>This operation immediately deletes the specified messages. If any of the message IDs are malformed or non-existent, they are ignored. The remaining valid messages IDs are deleted.</para>
</wadl:doc>
<request>
<param name="ids" style="query" type="xsd:string" required="true">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Specifies the IDs of the messages to delete.
</wadl:doc>
</param>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/deleteMessages_request-http.txt"/>
</doc>
</representation>
</request>
<response status="204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/deleteMessages_response-http.txt"/>
</doc>
</representation>
</response>
&commonFaults;
&deleteFaults;
</method>
<!--*******************************************************-->
<!-- CLAIMS METHODS -->
<!--*******************************************************-->
<!--*******************************************************-->
<!-- Claim Messages: claimMessages -->
<!--*******************************************************-->
<method name="POST" id="claimMessages">
<wadl:doc xml:lang="EN" title="Claim Messages" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Claims a set of messages from the specified queue.</para>
<para>This operation claims a set of messages (up to the value of the <code>limit</code> parameter) from oldest to newest and skips any messages that are already claimed. If no unclaimed messages are available, the API returns a <code>204 No Content</code> message.</para>
<para>When a client (worker) finishes processing a message, it should delete the message before the claim expires to ensure that the message is processed only once. As part of the delete operation, workers should specify the claim ID (which is best done by simply using the provided href). If workers perform these actions, then if a claim simply expires, the server can return an error and notify the worker of the race condition. This action gives the worker a chance to roll back its own processing of the given message because another worker can claim the message and process it.</para>
<para>The age given for a claim is relative to the server's clock. The claim's age is useful for determining how quickly messages are getting processed and whether a given message's claim is about to expire.</para>
<para>When a claim expires, it is released. If the original worker failed to process the message, another client worker can then claim the message.</para>
<note><para>Note that claim creation is best-effort, meaning the worker may claim and return less than the requested number of messages.</para></note>
<para>The <code>ttl</code> attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours). You must include a value for this attribute in your request.</para>
<para>The <code>grace</code> attribute specifies the message grace period in seconds. The value of <code>grace</code> value must be between 60 and 43200 seconds (12 hours). You must include a value for this attribute in your request. To deal with workers that have stopped responding (for up to 1209600 seconds or 14 days, including claim lifetime), the server extends the lifetime of claimed messages to be at least as long as the lifetime of the claim itself, plus the specified grace period. If a claimed message would normally live longer than the grace period, its expiration is not adjusted.</para>
</wadl:doc>
<request>
<param name="limit" style="query" type="xsd:integer" required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
Specifies the number of messages to claim. The <parameter>limit</parameter> parameter is configurable.
The default is 20. Messages
are claimed based on the number of messages available.
The server might claim and return less than the
requested number of messages.
</wadl:doc>
</param>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/claimMessages_request-http.txt"/>
<xsdxt:code href="../wadl/samples/claimMessages_request.json"/>
</doc>
</representation>
</request>
<response status="201 204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/claimMessages_response-http.txt"/>
<xsdxt:code href="../wadl/samples/claimMessages_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Query Claim: queryClaim -->
<!--*******************************************************-->
<method name="GET" id="queryClaim">
<wadl:doc xml:lang="EN" title="Query Claim" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Queries the specified claim for the specified queue.</para>
<para>This operation queries the specified claim for the specified queue. Claims with malformed IDs or claims that are not found by ID are ignored.</para>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/queryClaim_request-http.txt"/>
</doc>
</representation>
</request>
<response status="200">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/queryClaim_response-http.txt"/>
<xsdxt:code href="../wadl/samples/queryClaim_response.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Update Claim: updateClaim -->
<!--*******************************************************-->
<method name="PATCH" id="updateClaim">
<wadl:doc xml:lang="EN" title="Update Claim" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Updates the specified claim for the specified queue.</para>
<para>This operation updates the specified claim for the specified queue. Claims with malformed IDs or claims that are not found by ID are ignored.</para>
<para>Clients should periodically renew claims during long-running batches of work to avoid losing a claim while processing a message. The client can renew a claim by issuing a <command>PATCH</command> command to a specific claim resource and including a new TTL for the claim (which can be different from the original TTL). The server resets the age of the claim and applies the new TTL.</para>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/updateClaim_request-http.txt"/>
<xsdxt:code href="../wadl/samples/updateClaim_request.json"/>
</doc>
</representation>
</request>
<response status="204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/updateClaim_response-http.txt"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
<!--*******************************************************-->
<!-- Release Claim: deleteClaim -->
<!--*******************************************************-->
<method name="DELETE" id="deleteClaim">
<wadl:doc xml:lang="EN" title="Release Claim" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">Releases the specified claim for the specified queue.</para>
<para>This operation immediately releases a claim, making any remaining, undeleted) messages that are associated with the claim available to other workers. Claims with malformed IDs or claims that are not found by ID are ignored.</para>
<para>This operation is useful when a worker is performing a graceful shutdown, fails to process one or more messages, or is taking longer than expected to process messages, and wants to make the remainder of the messages available to other workers.</para>
</wadl:doc>
<request>
<representation mediaType="application/json" element="queues:Queue" >
<doc>
<xsdxt:code href="../wadl/samples/releaseClaim_request-http.txt"/>
</doc>
</representation>
</request>
<response status="204">
<representation mediaType="application/json" >
<doc>
<xsdxt:code href="../wadl/samples/releaseClaim_response-http.txt"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
</application>

View File

@ -0,0 +1,3 @@
{
"key":"value"
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<auth>
<id id="test"/>
</auth>

View File

@ -0,0 +1,3 @@
GET /v1/queues/demoqueue HTTP/1.1
Host: queues.api.openstack.org
X-Project-Id: <project_id>

View File

@ -0,0 +1 @@
HTTP/1.0 204 OK

View File

@ -0,0 +1,7 @@
POST /v1/queues/demoqueue/claims HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,4 @@
{
"ttl": 300,
"grace": 300
}

View File

@ -0,0 +1,4 @@
HTTP/1.1 201 OK
Content-Length: 162
Content-Type: application/json; charset=utf-8
Location: /v1/queues/demoqueue/claims/51db7067821e727dc24df754

View File

@ -0,0 +1,10 @@
[
{
"body": {
"event": "BackupStarted"
},
"age": 239,
"href": "/v1/queues/demoqueue/messages/51db6f78c508f17ddc924357?claim_id=51db7067821e727dc24df754",
"ttl": 300
}
]

View File

@ -0,0 +1,5 @@
PUT /v1/queues/demoqueue HTTP/1.1
Host: queues.api.openstack.org
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,3 @@
HTTP/1.1 201 Created
Content-Length: 0
Location: /v1/queues/demoqueue

View File

@ -0,0 +1,7 @@
DELETE /v1/queues/demoqueue/messages/51db6f78c508f17ddc924358 HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1 @@
HTTP/1.1 204 No Content

View File

@ -0,0 +1,7 @@
DELETE /v1/queues/demoqueue/messages?ids=50b68a50d6f5b8c8a7c62b01,50b68a50d6f5b8c8a7c62b02 HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1 @@
HTTP/1.1 204 No Content

View File

@ -0,0 +1,6 @@
DELETE /v1/queues/demoqueue HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1 @@
HTTP/1.1 204 No Content

View File

@ -0,0 +1,2 @@
GET /v1 HTTP/1.1
Host: queues.api.openstack.org

View File

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

View File

@ -0,0 +1,119 @@
{
"resources": {
"rel/queue": {
"href-template": "/queues/{queue_name}",
"href-vars": {
"queue_name": "param/queue_name"
},
"hints": {
"allow": [
"GET",
"HEAD",
"PUT",
"DELETE"
],
"formats": {
"application/json": {}
}
}
},
"rel/queue-metadata": {
"href-template": "/queues/{queue_name}/metadata",
"href-vars": {
"queue_name": "param/queue_name"
},
"hints": {
"allow": [
"GET",
"PUT"
],
"formats": {
"application/json": {}
}
}
},
"rel/queue-stats": {
"href-template": "/queues/{queue_name}/stats",
"href-vars": {
"queue_name": "param/queue_name"
},
"hints": {
"allow": [
"GET"
],
"formats": {
"application/json": {}
}
}
},
"rel/queues": {
"href-template": "/queues{?marker,limit,detailed}",
"href-vars": {
"marker": "param/marker",
"detailed": "param/detailed",
"limit": "param/queue_limit"
},
"hints": {
"allow": [
"GET"
],
"formats": {
"application/json": {}
}
}
},
"rel/post-messages": {
"href-template": "/v1/queues/{queue_name}/messages",
"href-vars": {
"queue_name": "param/queue_name"
},
"hints": {
"accept-post": [
"application/json"
],
"allow": [
"POST"
],
"formats": {
"application/json": {}
}
}
},
"rel/messages": {
"href-template": "/queues/{queue_name}/messages{?marker,limit,echo,include_claimed}",
"href-vars": {
"marker": "param/marker",
"include_claimed": "param/include_claimed",
"queue_name": "param/queue_name",
"limit": "param/messages_limit",
"echo": "param/echo"
},
"hints": {
"allow": [
"GET"
],
"formats": {
"application/json": {}
}
}
},
"rel/claim": {
"href-template": "/v1/queues/{queue_name}/claims{?limit}",
"href-vars": {
"queue_name": "param/queue_name",
"limit": "param/claim_limit"
},
"hints": {
"accept-post": [
"application/json"
],
"allow": [
"POST"
],
"formats": {
"application/json": {}
}
}
}
}
}

View File

@ -0,0 +1,7 @@
GET /v1/queues/demoqueue/messages?echo=true HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,6 @@
HTTP/1.1 204 No Content
HTTP/1.1 200 OK
Content-Length: 602
Content-Type: application/json; charset=utf-8
Content-Location: /v1/queues/demoqueue/messages?echo=true

View File

@ -0,0 +1,42 @@
{
"messages": [
{
"body": {
"event": "BackupStarted"
},
"age": 198,
"href": "/v1/queues/demoqueue/messages/51db6ecac508f17ddc9242ad",
"ttl": 300
},
{
"body": {
"event": "BackupStarted"
},
"age": 97,
"href": "/v1/queues/demoqueue/messages/51db6f2f821e727dc24df623",
"ttl": 300
},
{
"body": {
"event": "BackupStarted"
},
"age": 24,
"href": "/v1/queues/demoqueue/messages/51db6f78c508f17ddc924357",
"ttl": 300
},
{
"body": {
"play": "hockey"
},
"age": 24,
"href": "/v1/queues/demoqueue/messages/51db6f78c508f17ddc924358",
"ttl": 60
}
],
"links": [
{
"href": "/v1/queues/demoqueue/messages?marker=8&echo=true",
"rel": "next"
}
]
}

View File

@ -0,0 +1,6 @@
GET /v1/queues/demoqueue/metadata HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,4 @@
HTTP/1.1 200 OK
Content-Length: 25
Content-Type: application/json; charset=utf-8
Content-Location: /v1/queues/demoqueue/metadata

View File

@ -0,0 +1 @@
{"sms_template": "Warning: You have used {0}% of your storage ({1} out of {2}). Please consider upgrading your plan."}

View File

@ -0,0 +1,6 @@
GET /v1/queues/demoqueue/stats HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,4 @@
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json; charset=utf-8
Content-Location: /v1/queues/demoqueue/stats

View File

@ -0,0 +1,17 @@
{
"messages": {
"claimed": 2409,
"free": 146929,
"total": 149338,
"newest": {
"age": 12,
"created": "2013-08-12T20:45:46Z",
"href": "/v1/queues/fizbit/messages/50b68a50d6f5b8c8a7c62b01"
},
"oldest": {
"age": 63,
"created": "2013-08-12T20:44:55Z",
"href": "/v1/queues/fizbit/messages/50b68a50d6f5b8c8a7c62b01"
}
}
}

View File

@ -0,0 +1,7 @@
GET /v1/queues/demoqueue/messages?ids=51db6f78c508f17ddc924357,51db6ecac508f17ddc9242ad HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,4 @@
HTTP/1.1 200 OK
Content-Location: /v1/queues/fizbat/messages?ids=50b68a50d6f5b8c8a7c62b01,f5b8c8a7c62b0150b68a50d6
...

View File

@ -0,0 +1,20 @@
[
{
"href": "/v1/queues/fizbit/messages/50b68a50d6f5b8c8a7c62b01",
"ttl": 800,
"age": 32,
"body": {
"cmd": "EncodeVideo",
"jobid": 58229
}
},
{
"href": "/v1/queues/fizbit/messages/f5b8c8a7c62b0150b68a50d6",
"ttl": 800,
"age": 790,
"body": {
"cmd": "EncodeAudio",
"jobid": 58201
}
}
]

View File

@ -0,0 +1,7 @@
GET /v1/queues/demoqueue/messages/51db6ecac508f17ddc9242ad HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,4 @@
HTTP/1.1 200 OK
Content-Length: 126
Content-Type: application/json; charset=utf-8
Content-Location: /v1/queues/demoqueue/messages/51db6ecac508f17ddc9242ad

View File

@ -0,0 +1,8 @@
{
"body": {
"event": "BackupStarted"
},
"age": 240,
"href": "/v1/queues/demoqueue/messages/51db6ecac508f17ddc9242ad",
"ttl": 300
}

View File

@ -0,0 +1,6 @@
GET /v1/queues HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,4 @@
HTTP/1.1 200 OK
Content-Length: 3170
Content-Type: application/json; charset=utf-8
Content-Location: /v1/queues

View File

@ -0,0 +1,50 @@
{
"queues": [
{
"href": "/v1/queues/036b184b28fcb548349af623079119c6a966cbc",
"name": "036b184b28fcb548349af623079119c6a966cbc"
},
{
"href": "/v1/queues/0441f28617afbdecf4887e635fd0777fb3cec38",
"name": "0441f28617afbdecf4887e635fd0777fb3cec38"
},
{
"href": "/v1/queues/0f8f0eff158922874536efa9cf8412b9e0fd07a",
"name": "0f8f0eff158922874536efa9cf8412b9e0fd07a"
},
{
"href": "/v1/queues/160f981379972a4a0afaee5f5394a5d960c410e",
"name": "160f981379972a4a0afaee5f5394a5d960c410e"
},
{
"href": "/v1/queues/2888a4527d0a11a3d82202d800f8e90eebd60ea",
"name": "2888a4527d0a11a3d82202d800f8e90eebd60ea"
},
{
"href": "/v1/queues/2ad8eeca7f53d480d8ca4885d620643bfc6a7f9",
"name": "2ad8eeca7f53d480d8ca4885d620643bfc6a7f9"
},
{
"href": "/v1/queues/3926ce2051db957d76a04cb2ea2d89fd49e6894",
"name": "3926ce2051db957d76a04cb2ea2d89fd49e6894"
},
{
"href": "/v1/queues/46b30ebd60186c30194039824e6405300dc0903",
"name": "46b30ebd60186c30194039824e6405300dc0903"
},
{
"href": "/v1/queues/486d5af3e057ee1a430eee3ee845aeb60c900d3",
"name": "486d5af3e057ee1a430eee3ee845aeb60c900d3"
},
{
"href": "/v1/queues/58e8622645f07c7673412acbed51abb97ddb25d",
"name": "58e8622645f07c7673412acbed51abb97ddb25d"
}
],
"links": [
{
"href": "/v1/queues?marker=58e8622645f07c7673412acbed51abb9",
"rel": "next"
}
]
}

View File

@ -0,0 +1,7 @@
POST /v1/queues/demoqueue/messages HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,14 @@
[
{
"ttl": 300,
"body": {
"event": "BackupStarted"
}
},
{
"ttl": 60,
"body": {
"play": "hockey"
}
}
]

View File

@ -0,0 +1,4 @@
HTTP/1.1 201 Created
Content-Length: 149
Content-Type: application/json; charset=utf-8
Location: /v1/queues/demoqueue/messages?ids=51db6f78c508f17ddc924357,51db6f78c508f17ddc924358

View File

@ -0,0 +1,7 @@
{
"partial": false,
"resources": [
"/v1/queues/demoqueue/messages/51db6f78c508f17ddc924357",
"/v1/queues/demoqueue/messages/51db6f78c508f17ddc924358"
]
}

View File

@ -0,0 +1,7 @@
GET /v1/queues/demoqueue/claims/51db7067821e727dc24df754 HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,4 @@
HTTP/1.1 200 OK
Content-Length: 263
Content-Type: application/json; charset=utf-8
Content-Location: /v1/queues/demoqueue/claims/51db7067821e727dc24df754

View File

@ -0,0 +1,15 @@
{
"age": 57,
"href": "/v1/queues/demoqueue/claims/51db7067821e727dc24df754",
"messages": [
{
"body": {
"event": "BackupStarted"
},
"age": 296,
"href": "/v1/queues/demoqueue/messages/51db6f78c508f17ddc924357?claim_id=51db7067821e727dc24df754",
"ttl": 300
}
],
"ttl": 300
}

View File

@ -0,0 +1,7 @@
DELETE /v1/queues/demoqueue/claims/51db7067821e727dc24df754 HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1 @@
HTTP/1.1 204 No Content

View File

@ -0,0 +1,6 @@
PUT /v1/queues/demoqueue/metadata HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,3 @@
{
"new metadata": "Omega"
}

View File

@ -0,0 +1,2 @@
HTTP/1.1 204 No Content
Location: /v1/queues/demoqueue/metadata

View File

@ -0,0 +1,7 @@
PATCH /v1/queues/demoqueue/claims/51db7067821e727dc24df754 HTTP/1.1
Host: queues.api.openstack.org
Content-type: application/json
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830
Accept: application/json
X-Project-Id: <project_id>

View File

@ -0,0 +1,4 @@
{
"ttl": 300,
"grace": 300
}

View File

@ -0,0 +1 @@
HTTP/1.1 204 No Content

View File

@ -19,3 +19,5 @@ requests>=1.1
# Documentation
sphinx>=1.1.2,<1.2
oslo.sphinx
openstack-doc-tools>=0.8.2