Merge "Adding job binaries wadl and json examples"
This commit is contained in:
@@ -23,4 +23,25 @@
|
||||
href="../wadls/dataprocessing-api/src/v1.1/wadl/data-sources.wadl"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
|
||||
</section>
|
||||
<section xml:id="v1.1jobbinaries">
|
||||
<title>Job Binaries</title>
|
||||
<para>
|
||||
Job binaries are objects that represent data processing applications
|
||||
and libraries stored in either the internal database or the Object
|
||||
Storage service.
|
||||
</para>
|
||||
<wadl:resources xmlns:wadl="http://wadl.dev.java.net/2009/02">
|
||||
<wadl:resource href="../wadls/dataprocessing-api/src/v1.1/wadl/job-binaries.wadl#job-binaries">
|
||||
<wadl:method href="#job-binaries-list"/>
|
||||
<wadl:method href="#job-binaries-create"/>
|
||||
</wadl:resource>
|
||||
<wadl:resource href="../wadls/dataprocessing-api/src/v1.1/wadl/job-binaries.wadl#job-binaries-id">
|
||||
<wadl:method href="#job-binaries-show"/>
|
||||
<wadl:method href="#job-binaries-delete"/>
|
||||
</wadl:resource>
|
||||
<wadl:resource href="../wadls/dataprocessing-api/src/v1.1/wadl/job-binaries.wadl#job-binaries-id-data">
|
||||
<wadl:method href="#job-binaries-data"/>
|
||||
</wadl:resource>
|
||||
</wadl:resources>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"url": "swift://container/jar-example.jar",
|
||||
"name": "jar-example.jar",
|
||||
"description": "This is a job binary",
|
||||
"extra": {
|
||||
"password": "swordfish",
|
||||
"user": "admin"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"job_binary": {
|
||||
"description": "This is a job binary",
|
||||
"url": "swift://container/jar-example.jar",
|
||||
"tenant_id": "11587919cc534bcbb1027a161c82cf58",
|
||||
"created_at": "2013-10-15 14:49:20.106452",
|
||||
"id": "07f86352-ee8a-4b08-b737-d705ded5ff9c",
|
||||
"name": "jar-example.jar"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"binaries": [
|
||||
{
|
||||
"description": "",
|
||||
"url": "internal-db://d2498cbf-4589-484a-a814-81436c18beb3",
|
||||
"tenant_id": "11587919cc534bcbb1027a161c82cf58",
|
||||
"created_at": "2013-10-15 12:36:59.375060",
|
||||
"updated_at": null,
|
||||
"id": "84248975-3c82-4206-a58d-6e7fb3a563fd",
|
||||
"name": "example.pig"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"url": "internal-db://22f1d87a-23c8-483e-a0dd-cb4a16dde5f9",
|
||||
"tenant_id": "11587919cc534bcbb1027a161c82cf58",
|
||||
"created_at": "2013-10-15 12:43:52.265899",
|
||||
"updated_at": null,
|
||||
"id": "508fc62d-1d58-4412-b603-bdab307bb926",
|
||||
"name": "udf.jar"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"url": "swift://container/jar-example.jar",
|
||||
"tenant_id": "11587919cc534bcbb1027a161c82cf58",
|
||||
"created_at": "2013-10-15 14:25:04.970513",
|
||||
"updated_at": null,
|
||||
"id": "a716a9cd-9add-4b12-b1b6-cdb71aaef350",
|
||||
"name": "jar-example.jar"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"job_binary": {
|
||||
"description": "an example jar file",
|
||||
"url": "swift://container/jar-example.jar",
|
||||
"tenant_id": "11587919cc534bcbb1027a161c82cf58",
|
||||
"created_at": "2013-10-15 14:25:04.970513",
|
||||
"updated_at": null,
|
||||
"id": "a716a9cd-9add-4b12-b1b6-cdb71aaef350",
|
||||
"name": "jar-example.jar"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- (C) 2015 OpenStack Foundation, All Rights Reserved -->
|
||||
<!--*******************************************************-->
|
||||
<!-- Import Common XML Entities -->
|
||||
<!-- -->
|
||||
<!-- You can resolve the entities with xmllint -->
|
||||
<!-- -->
|
||||
<!-- xmllint -noent job-binaries.wadl -->
|
||||
<!--*******************************************************-->
|
||||
<!DOCTYPE application [
|
||||
<!ENTITY % common_project SYSTEM "../../../../common_project.ent">
|
||||
%common_project;
|
||||
]>
|
||||
<application xmlns="http://wadl.dev.java.net/2009/02"
|
||||
xmlns:capi="http://docs.openstack.org/common/api/v1.0"
|
||||
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:wadl="http://wadl.dev.java.net/2009/02"
|
||||
xmlns:csapi="http://docs.openstack.org/compute/api/v2">
|
||||
<resources base="https://servers.api.openstack.com"
|
||||
xml:id="job-binaries-v1.1">
|
||||
<resource id="v1.1" path="//v1.1">
|
||||
<resource id="tenant_id" path="{tenant_id}">
|
||||
<param name="tenant_id" style="template" type="csapi:UUID">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>The unique identifier of the tenant or account.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<resource id="job-binaries" path="job-binaries">
|
||||
<method href="#job-binaries-list"/>
|
||||
<method href="#job-binaries-create"/>
|
||||
<resource id="job-binaries-id" path="{job_binaries_id}">
|
||||
<param name="job_binaries_id" style="template" type="csapi:UUID">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>The ID of the job binary.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<method href="#job-binaries-show"/>
|
||||
<method href="#job-binaries-delete"/>
|
||||
<resource id="job-binaries-id-data" path="data">
|
||||
<method href="#job-binaries-data"/>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
<!-- *******************************************************-->
|
||||
<!-- Job binary actions -->
|
||||
<!-- *******************************************************-->
|
||||
<method name="GET" id="job-binaries-list">
|
||||
<wadl:doc xml:lang="EN" title="List job binaries"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">Lists the available job binaries.</para>
|
||||
</wadl:doc>
|
||||
<response status="200">
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xml:lang="EN" xmlns="http://docbook.org/ns/docbook">
|
||||
<xsdxt:code
|
||||
href="../samples/job-binaries/list-resp.json"
|
||||
/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
<method name="POST" id="job-binaries-create">
|
||||
<wadl:doc xml:lang="EN" title="Create job binary"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">Creates a job binary.</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xml:lang="EN" xmlns="http://docbook.org/ns/docbook">
|
||||
<xsdxt:code
|
||||
href="../samples/job-binaries/create-req.json"
|
||||
/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="202">
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xml:lang="EN" xmlns="http://docbook.org/ns/docbook">
|
||||
<xsdxt:code
|
||||
href="../samples/job-binaries/create-resp.json"
|
||||
/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
<method name="GET" id="job-binaries-show">
|
||||
<wadl:doc xml:lang="EN" title="Show job binary details"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">Shows details for a specified
|
||||
job binary.</para>
|
||||
</wadl:doc>
|
||||
<response status="200">
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xml:lang="EN" xmlns="http://docbook.org/ns/docbook">
|
||||
<xsdxt:code
|
||||
href="../samples/job-binaries/show-resp.json"
|
||||
/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
<method name="DELETE" id="job-binaries-delete">
|
||||
<wadl:doc xml:lang="EN" title="Delete job binary"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">Deletes a specified job binary.</para>
|
||||
</wadl:doc>
|
||||
<response status="204"/>
|
||||
</method>
|
||||
<method name="GET" id="job-binaries-data">
|
||||
<wadl:doc xml:lang="EN" title="Get job binary data"
|
||||
xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">Get data for a specified job
|
||||
binary</para>
|
||||
<para>The response body shows the job binary raw data and
|
||||
the response headers show the data length.</para>
|
||||
<para>Example response:</para>
|
||||
<para><programlisting>HTTP/1.1 200 OK
|
||||
Connection: keep-alive
|
||||
Content-Length: 161
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Date: Sat, 28 Mar 2015 02:42:48 GMT
|
||||
|
||||
A = load '$INPUT' using PigStorage(':') as (fruit: chararray);
|
||||
B = foreach A generate com.hadoopbook.pig.Trim(fruit);
|
||||
store B into '$OUTPUT' USING PigStorage();</programlisting></para>
|
||||
</wadl:doc>
|
||||
<response status="200">
|
||||
<param name="Content-Length" style="header" type="xsd:string"
|
||||
required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>The length of the returned data in bytes.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<!-- the following element is present to suppress the output
|
||||
about this method not returning a body -->
|
||||
<representation/>
|
||||
</response>
|
||||
</method>
|
||||
</application>
|
||||
Reference in New Issue
Block a user