Skip to content

Commit

Permalink
update Images API v2 quick ref
Browse files Browse the repository at this point in the history
The Images API quick-ref docs are still at 2.0 (pre-grizzly).
They need to be updated to Grizzly (2.1, some new calls) and
Havana (2.2, some response body modifications).  "Since" fields
are added where appropriate to indicate when the call was
introduced into the Images v2 API.

Also updated schema examples to illustrate v 2.2 response.

Closes-Bug: #1233793
Change-Id: I5996e27c863212c50ea6a18468d9e5263471126a
  • Loading branch information
Brian Rosmaita committed Oct 4, 2013
1 parent f0fc3a6 commit 4bf9293
Show file tree
Hide file tree
Showing 12 changed files with 1,227 additions and 167 deletions.
13 changes: 7 additions & 6 deletions api-ref/src/docbkx/api-ref-image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@
Reference</citetitle></link>.</para>
<para>&nbsp;</para>
</preface> -->
<chapter xml:id="os-images-2.0">
<title>Image Service API 2.0</title>
<para>Creates, updates, and deletes image metadata records. Also,
uploads and downloads raw image data.</para>
<chapter xml:id="os-images-2">
<title>Image Service API v2</title>
<para>Creates, updates, and deletes image metadata records. Enables
users to share images with each other. Also, uploads and downloads
raw image data.</para>
<wadl:resources
href="../wadls/image-api/src/v2/os-image-schemas-2.0.wadl"
href="../wadls/image-api/src/v2/os-image-schemas-2.2.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
<wadl:resources href="../wadls/image-api/src/v2/os-image-2.0.wadl"
<wadl:resources href="../wadls/image-api/src/v2/os-image-2.2.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</chapter>
<chapter xml:id="os-images-1.0">
Expand Down
559 changes: 559 additions & 0 deletions api-ref/src/wadls/image-api/src/v2/os-image-2.2.wadl

Large diffs are not rendered by default.

156 changes: 156 additions & 0 deletions api-ref/src/wadls/image-api/src/v2/os-image-schemas-2.2.wadl
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2013 OpenStack Foundation, All Rights Reserved -->

<!--*******************************************************-->
<!-- Import Common XML Entities -->
<!-- -->
<!-- You can resolve the entites with xmllint -->
<!-- -->
<!-- xmllint -noent os-image-schemas-2.2.wadl -->
<!--*******************************************************-->
<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent">
%common;]>

<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns="http://wadl.dev.java.net/2009/02"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:imageapi="http://docs.openstack.org/image/api/v2.2"
xmlns:common="http://docs.openstack.org/common/api/v1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:csapi="http://docs.openstack.org/compute/api/v2"
targetNamespace="http://docs.openstack.org/compute/api/v2"
xsi:schemaLocation="http://docs.openstack.org/compute/api/v2
xsd/api.xsd
http://docs.openstack.org/common/api/v1.0
xsd/api-common.xsd
">

<grammars>
<include href="xsd/api.xsd"/>
<include href="xsd/api-common.xsd"/>
<include href="xsd/faults.xsd"/>
</grammars>

<!--*******************************************************-->
<!-- All Resources -->
<!--*******************************************************-->

<resources base="https://glance.example.com/">
<resource id="info" path="v2">
<resource id="schemas" path="schemas">
<resource id="Image-schemas" type="#SchemasList"
path="images">
<method href="#getImagesSchema"/>
</resource>
<resource id="Image-schema" type="#SchemaList"
path="image">
<method href="#getImageSchema"/>
</resource>
<resource id="Image-members-schema" type="#SchemasList"
path="members">
<method href="#getImageMembersSchema"/>
</resource>
<resource id="Image-member-schema" type="#SchemaList"
path="member">
<method href="#getImageMemberSchema"/>
</resource>
</resource>
</resource>
</resources>

<!--*******************************************************-->
<!-- All Methods -->
<!--*******************************************************-->

<method name="GET" id="getImagesSchema">
<wadl:doc xml:lang="EN" xmlns="http://docbook.org/ns/docbook"
title="Get Images Schema">
<para role="shortdesc">Gets a json-schema document that
represents an images entity</para>
<para>An images entity is a container of image entities.
</para>
<para>The schema below is solely an example. Only the
response to the API call should be considered
authoritative.
</para>
<para><emphasis>Since: Images 2.0</emphasis></para>
</wadl:doc>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="samples/schemas-images-get-response.json"
/>
</doc>
</representation>
</response>
</method>
<method name="GET" id="getImageSchema">
<wadl:doc xml:lang="EN" xmlns="http://docbook.org/ns/docbook"
title="Get Image Schema">
<para role="shortdesc">Gets a json-schema document that
represents an image entity. </para>
<para>The schema below is solely an example. Only the
response to the API call should be considered
authoritative.
</para>
<para><emphasis>Since: Images 2.0</emphasis></para>
</wadl:doc>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="samples/schemas-image-get-response.json"
/>
</doc>
</representation>
</response>
</method>
<method name="GET" id="getImageMembersSchema">
<wadl:doc xml:lang="EN" xmlns="http://docbook.org/ns/docbook"
title="Get Image Members Schema">
<para role="shortdesc">Gets a json-schema document that
represents an image members entity</para>
<para>An image members entity is a container of image
member entities.
</para>
<para>The schema below is solely an example. Only the
response to the API call should be considered
authoritative.
</para>
<para><emphasis>Since: Images 2.1</emphasis></para>
</wadl:doc>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="samples/schemas-image-members-get-response.json"
/>
</doc>
</representation>
</response>
</method>
<method name="GET" id="getImageMemberSchema">
<wadl:doc xml:lang="EN" xmlns="http://docbook.org/ns/docbook"
title="Get Image Member Schema">
<para role="shortdesc">Gets a json-schema document that
represents an image member entity. </para>
<para>The schema below is solely an example. Only the
response to the API call should be considered
authoritative.
</para>
<para><emphasis>Since: Images 2.1</emphasis></para>
</wadl:doc>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="samples/schemas-image-member-get-response.json"
/>
</doc>
</representation>
</response>
</method>
</application>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"member": "8989447062e04a818baf9e073fd04fa7"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"created_at": "2013-09-20T19:22:19Z",
"image_id": "a96be11e-8536-4910-92cb-de50aa19dfe6",
"member_id": "8989447062e04a818baf9e073fd04fa7",
"schema": "/v2/schemas/member",
"status": "pending",
"updated_at": "2013-09-20T19:25:31Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"status": "accepted"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"created_at": "2013-09-20T19:22:19Z",
"image_id": "a96be11e-8536-4910-92cb-de50aa19dfe6",
"member_id": "8989447062e04a818baf9e073fd04fa7",
"schema": "/v2/schemas/member",
"status": "accepted",
"updated_at": "2013-09-20T20:15:31Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"id":"da3b75d9-3f4a-40e7-8a2c-bfab23927dea",
"name":"Fedora 17",
"status":"active",
"visibility":"public",
"size":2254249,
"checksum":"2cec138d7dae2aa59038ef8c9aec2390",
"tags":[
"fedora",
"beefy"
],
"created_at":"2012-08-10T19:23:50Z",
"updated_at":"2012-08-12T11:11:33Z",
"self":"/v2/images/da3b75d9-3f4a-40e7-8a2c-bfab23927dea",
"file":"/v2/images/da3b75d9-3f4a-40e7-8a2c-bfab23927dea/file",
"schema":"/v2/schemas/image"
}

0 comments on commit 4bf9293

Please sign in to comment.