Add Samples endpoint to the Telemetry API Reference
Change-Id: Ibbd03f108574ca8a540c86221d89cb198e38d359
This commit is contained in:
parent
eb862df53a
commit
5bb56d7d65
@ -7,7 +7,7 @@
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02"
|
||||
version="5.0-extension RackBook-2.0" xml:id="telemetry-v2">
|
||||
<title>Telemetry API v2 (CURRENT)</title>
|
||||
<para>Manage telemetry operations.</para>
|
||||
<para>Manage Telemetry operations.</para>
|
||||
<section xml:id="alarms">
|
||||
<title>Alarms</title>
|
||||
<para>List, create, gets details for, update, and delete
|
||||
@ -54,6 +54,20 @@
|
||||
</wadl:resource>
|
||||
</wadl:resources>
|
||||
</section>
|
||||
<section xml:id="samples">
|
||||
<title>Samples</title>
|
||||
<para>Get samples.</para>
|
||||
<wadl:resources xmlns:wadl="http://wadl.dev.java.net/2009/02">
|
||||
<wadl:resource
|
||||
href="../wadls/telemetry-api/src/v2/os-telemetry-api-2.0.wadl#samples">
|
||||
<wadl:method href="#listSamples"/>
|
||||
</wadl:resource>
|
||||
<wadl:resource
|
||||
href="../wadls/telemetry-api/src/v2/os-telemetry-api-2.0.wadl#sample_id">
|
||||
<wadl:method href="#showSample"/>
|
||||
</wadl:resource>
|
||||
</wadl:resources>
|
||||
</section>
|
||||
<section xml:id="resources">
|
||||
<title>Resources</title>
|
||||
<para>Get information for resources.</para>
|
||||
|
@ -41,6 +41,12 @@
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
<resource path="samples" id="samples">
|
||||
<method href="#listSamples"/>
|
||||
<resource path="{sample_id}" id="sample_id">
|
||||
<method href="#showSample"/>
|
||||
</resource>
|
||||
</resource>
|
||||
<resource path="resources" id="resources">
|
||||
<method href="#listResources"/>
|
||||
<resource path="{resource_id}" id="resource_id">
|
||||
@ -271,6 +277,71 @@
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
<method id="listSamples" name="GET">
|
||||
<wadl:doc title="List samples" xml:lang="EN"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">Lists all known samples, based on
|
||||
the data recorded so far.</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/xml">
|
||||
<param name="q" required="false" style="query"
|
||||
type="xsd:list">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN">
|
||||
<para>Filter rules for the samples to be
|
||||
returned.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xml:lang="EN"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<xsdxt:code href="./samples/list_samples.json"/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
<representation mediaType="application/xml">
|
||||
<wadl:doc xml:lang="EN"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<xsdxt:code href="./samples/list_samples.xml"/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
<method id="showSample" name="GET">
|
||||
<wadl:doc title="Show sample" xml:lang="EN"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">Gets sample for the specified
|
||||
id.</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/xml">
|
||||
<param name="sample_id" required="false" style="query"
|
||||
type="xsd:list">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xml:lang="EN">
|
||||
<para>The id of the sample.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xml:lang="EN"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<xsdxt:code href="./samples/new_sample.json"/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
<representation mediaType="application/xml">
|
||||
<wadl:doc xml:lang="EN"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<xsdxt:code href="./samples/new_sample.xml"/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
<method id="listAlarms" name="GET">
|
||||
<wadl:doc title="List alarms" xml:lang="EN"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
|
@ -0,0 +1,19 @@
|
||||
[
|
||||
{
|
||||
"id": "8db08c68-bc70-11e4-a8c4-fa163e1d1a9b",
|
||||
"metadata": {
|
||||
"name1": "value1",
|
||||
"name2": "value2"
|
||||
},
|
||||
"meter": "instance",
|
||||
"project_id": "35b17138-b364-4e6a-a131-8f3099c5be68",
|
||||
"recorded_at": "2015-02-24T22:00:32.747930",
|
||||
"resource_id": "bd9431c1-8d69-4ad3-803a-8d4a6b89fd36",
|
||||
"source": "openstack",
|
||||
"timestamp": "2015-02-24T22:00:32.747930",
|
||||
"type": "gauge",
|
||||
"unit": "instance",
|
||||
"user_id": "efd87807-12d2-4b38-9c70-5f5c2ac427ff",
|
||||
"volume": 1.0
|
||||
}
|
||||
]
|
@ -0,0 +1,25 @@
|
||||
<values>
|
||||
<value>
|
||||
<id>8db08c68-bc70-11e4-a8c4-fa163e1d1a9b</id>
|
||||
<meter>instance</meter>
|
||||
<type>gauge</type>
|
||||
<unit>instance</unit>
|
||||
<volume>1.0</volume>
|
||||
<user_id>efd87807-12d2-4b38-9c70-5f5c2ac427ff</user_id>
|
||||
<project_id>35b17138-b364-4e6a-a131-8f3099c5be68</project_id>
|
||||
<resource_id>bd9431c1-8d69-4ad3-803a-8d4a6b89fd36</resource_id>
|
||||
<source>openstack</source>
|
||||
<timestamp>2015-02-24T22:00:32.747930</timestamp>
|
||||
<recorded_at>2015-02-24T22:00:32.747930</recorded_at>
|
||||
<metadata>
|
||||
<item>
|
||||
<key>name2</key>
|
||||
<value>value2</value>
|
||||
</item>
|
||||
<item>
|
||||
<key>name1</key>
|
||||
<value>value1</value>
|
||||
</item>
|
||||
</metadata>
|
||||
</value>
|
||||
</values>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"id": "8db08c68-bc70-11e4-a8c4-fa163e1d1a9b",
|
||||
"metadata": {
|
||||
"name1": "value1",
|
||||
"name2": "value2"
|
||||
},
|
||||
"meter": "instance",
|
||||
"project_id": "35b17138-b364-4e6a-a131-8f3099c5be68",
|
||||
"recorded_at": "2015-02-24T22:00:32.747930",
|
||||
"resource_id": "bd9431c1-8d69-4ad3-803a-8d4a6b89fd36",
|
||||
"source": "openstack",
|
||||
"timestamp": "2015-02-24T22:00:32.747930",
|
||||
"type": "gauge",
|
||||
"unit": "instance",
|
||||
"user_id": "efd87807-12d2-4b38-9c70-5f5c2ac427ff",
|
||||
"volume": 1.0
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
<value>
|
||||
<id>8db08c68-bc70-11e4-a8c4-fa163e1d1a9b</id>
|
||||
<meter>instance</meter>
|
||||
<type>gauge</type>
|
||||
<unit>instance</unit>
|
||||
<volume>1.0</volume>
|
||||
<user_id>efd87807-12d2-4b38-9c70-5f5c2ac427ff</user_id>
|
||||
<project_id>35b17138-b364-4e6a-a131-8f3099c5be68</project_id>
|
||||
<resource_id>bd9431c1-8d69-4ad3-803a-8d4a6b89fd36</resource_id>
|
||||
<source>openstack</source>
|
||||
<timestamp>2015-02-24T22:00:32.747930</timestamp>
|
||||
<recorded_at>2015-02-24T22:00:32.747930</recorded_at>
|
||||
<metadata>
|
||||
<item>
|
||||
<key>name2</key>
|
||||
<value>value2</value>
|
||||
</item>
|
||||
<item>
|
||||
<key>name1</key>
|
||||
<value>value1</value>
|
||||
</item>
|
||||
</metadata>
|
||||
</value>
|
Loading…
x
Reference in New Issue
Block a user