Pipeline API is used for calling specific features of pipeline service from different languages via Web.
To use pipeline API, the API settings of pipeline service should be enabled. Also the API key issued in pipeline service is needed.
When enabled API Settings at the first time, API key is issued, and will be displayed in the bottom "API Key" field.
When the API Key is issued at the first time, the above procedure of "Enable API Settings of pipeline service" will be published. When the API Key is reissued, refer to the procedure above and display the "API Settings" page in pipeline coordinator, and click the "Update" button of "API Key" field below. API Key will appear in "API Key" field.
When using API, please set X-Pipelinewebapi:API Key to http header.
The format of request URL is as follows.
http://[Host name]:[Port No.]/pipelineapi/[Specify API]/[Type of Response]
| Host name | Specify the Host name of pipeline service. |
|---|---|
| Port No. | Specify the Port No. of pipeline service. Default value is 25080 in installation. If you want to change it in installation, please specify the new Port No. . |
| Specify API | Specify the path of pipeline API to execute. Please refer to URL field of API List. |
| Type of response | Specify either xml,json or htm. There are 3 content types of responses returned by pipeline service, XML(text/xml), JSON(text/javascript) and HTML(text/html). It can be omitted, if omitted it will be XML. |
Specify HTTP method to use different API services.
Return either of the forms(XML,JSON,HTML)of response type specified in the request.
For example, the responses for requests of the got pipeline list are as follows.(Server address is hostname, Port No. is 25080)
<Request URL> http://hostname:25080/pipelineapi/list/xml
<?xml version="1.0" encoding="UTF-8"?>
<PipelineList>
<PipeLine>
<Id>pl_00001</Id><Name>Pipeline sample</Name><Runmode>run</Runmode>
<Createdate>2007-08-31T19:58:36.752 JST</Createdate>
<Updatedate>2007-09-14T07:37:15.692 JST</Updatedate>
<Description>Please write description</Description>
</PipeLine>
<PipeLine>
<Id>pl_00002</Id><Name>Pipeline-test</Name><Runmode>stop</Runmode>
<Createdate>2007-08-31T19:58:56.907 JST</Createdate>
<Updatedate>2007-08-31T19:58:56.907 JST</Updatedate>
<Description>Please write description</Description>
</PipeLine>
<PipeLine>
<Id>pl_00005</Id><Name>New pipeline</Name><Runmode>stop</Runmode>
<Createdate>2007-09-07T17:22:51.473 JST</Createdate>
<Updatedate>2007-09-07T23:57:32.252 JST</Updatedate>
<Description>Please write description</Description>
</PipeLine>
<PipeLine>
<Id>pl_00006</Id><Name>SfDC</Name><Runmode>stop</Runmode>
<Createdate>2007-09-10T17:40:55.334 JST</Createdate>
<Updatedate>2007-09-10T18:25:03.015 JST</Updatedate>
<Description>Please write description</Description>
</PipeLine>
<PipeLine>
<Id>pl_00007</Id><Name>New pipeline</Name><Runmode>run</Runmode>
<Createdate>2007-09-14T02:50:15.913 JST</Createdate>
<Updatedate>2007-09-14T02:53:58.568 JST</Updatedate>
<Description>Please write description</Description>
</PipeLine>
</PipelineList>
<Request URL> http://hostname:25080/pipelineapi/list/json
{"PipelineList":
{"PipeLine":
[
{"Name":"Pipeline-Sample","Description":"Please write description","Updatedate":"2007-09-14T07:37:15.692 JST",
"Id":"pl_00001","Createdate":"2007-08-31T19:58:36.752 JST","Runmode":"run"},
{"Name":"Pipeline-Test","Description":"Please write description","Updatedate":"2007-08-31T19:58:56.907 JST",
"Id":"pl_00002","Createdate":"2007-08-31T19:58:56.907 JST","Runmode":"stop"},
{"Name":"New pipeline","Description":"Please write description","Updatedate":"2007-09-07T23:57:32.252 JST",
"Id":"pl_00005","Createdate":"2007-09-07T17:22:51.473 JST","Runmode":"stop"},
{"Name":"SfDC","Description":"Please write description","Updatedate":"2007-09-10T18:25:03.015 JST",
"Id":"pl_00006","Createdate":"2007-09-10T17:40:55.334 JST","Runmode":"stop"},
{"Name":"New pipeline","Description":"Please write description","Updatedate":"2007-09-14T02:53:58.568 JST",
"Id":"pl_00007","Createdate":"2007-09-14T02:50:15.913 JST","Runmode":"run"}
]
}
}
<Request URL> http://hostname:25080/pipelineapi/list/htm
<?xml version="1.0" encoding="UTF-8"?>
<table>
<tr>
<td>pl_00001</td><td>Pipeline-Sample</td><td>run</td>
<td>2007-08-31T19:58:36.752 JST</td><td>2007-09-14T07:37:15.692 JST</td><td>Please write description</td>
</tr>
<tr>
:
:
<tr>
<td>pl_00007</td><td>New Pipeline</td><td>run</td>
<td>2007-09-14T02:50:15.913 JST</td><td>2007-09-14T02:53:58.568 JST</td><td>Please write description</td>
</tr>
</table>
| URL | URL of API |
|---|---|
| Description | Description of API |
| Request | Parameters that can be set in request |
| Response | Description of response note |
| URL | http://[hostname]:[port]/pipelineapi/list | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Return the list of all pipelines | ||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||
<Request> GET /pipelineapi/list/xml HTTP/1.1 X-Pipelinewebapi: 1d1687d0-ec6e-4a78-ad66-be9c024c34f1-0deafe00f429d31e0f62ff2baaf5789d Connection: close Accept: */* Content-Type: application/x-www-form-urlencoded Host: 192.168.5.165:38080 <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 1323 Server: ASTERIA HTTP Daemon/1.01 Date: Thu, 13 Sep 2007 21:51:53 GMT Connection: close <?xml version="1.0" encoding="UTF-8"?> <PipelineList> <PipeLine> <Id>pl_00001</Id> <Name>Pipeline-Sample</Name> <Runmode>run</Runmode> <Createdate>2007-08-31T19:58:36.752 JST</Createdate> <Updatedate>2007-09-14T05:10:38.627 JST</Updatedate> <Description>Please write description</Description> </PipeLine> <PipeLine> <Id>pl_00002</Id> <Name>Pipeline-Test</Name> <Runmode>stop</Runmode><Createdate>2007-08-31T19:58:56.907 JST</Createdate> <Updatedate>2007-08-31T19:58:56.907 JST</Updatedate> <Description>Please write description</Description> </PipeLine> <PipeLine> <Id>pl_00005</Id> <Name>New Pipeline</Name> <Runmode>stop</Runmode> <Createdate>2007-09-07T17:22:51.473 JST</Createdate> <Updatedate>2007-09-07T23:57:32.252 JST</Updatedate> <Description>Please write description</Description> <Args> <Item> <Name>parameter name</Name> <Value>default value</Value> </Item> </Args> </PipeLine> </PipelineList> |
|||||||||||||||||||||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/exec | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Execute Pipeline. Specify the pipeline to execute by id. | ||||||||||||||||||
|
| |||||||||||||||||||
<Request> POST /pipelineapi/exec/xml HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close Host: 192.168.5.165:38080 User-Agent: libwww-perl/5.805 Content-Length: 38 Content-Type: application/x-www-form-urlencoded X-PIPELINEWEBAPI: 1d1687d0-ec6e-4a78-ad66-be9c024c34f1-0deafe00f429d31e0f62ff2baaf5789d pipelineid=pl_00001&filename=plrun.dat <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 120 Server: ASTERIA HTTP Daemon/1.01 Date: Thu, 13 Sep 2007 22:47:15 GMT Connection: close <?xml version="1.0" encoding="UTF-8"?> <ExecuteResponse> <Status>OK</Status> <Message>Success</Message> </ExecuteResponse> |
|||||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/requestlist | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Return the list of request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Request> GET /pipelineapi/requestlist/xml?id=pl_00001&date=20070914 HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close Host: 192.168.5.165:38080 User-Agent: libwww-perl/5.805 Content-Type: application/x-www-form-urlencoded X-PIPELINEWEBAPI: 1d1687d0-ec6e-4a78-ad66-be9c024c34f1-0deafe00f429d31e0f62ff2baaf5789d <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 670 Server: ASTERIA HTTP Daemon/1.01 Date: Thu, 13 Sep 2007 21:35:19 GMT Connection: close <?xml version="1.0" encoding="UTF-8"?> <RequestList> <Request> <RequestId>pl_00001-20070914_05-000002</RequestId> <PipelineId>pl_00001</PipelineId> <Name>Pipeline-Sample</Name> <Status>Finish</Status> <Stage>Complete</Stage> <BeginDate>2007-09-14 05:11:12</BeginDate> </Request> <Request> <RequestId>pl_00001-20070914_05-000001</RequestId> <PipelineId>pl_00001</PipelineId> <Name>Pipeline-Sample</Name> <Status>Finish</Status> <Stage>Complete</Stage> <BeginDate>2007-09-14 05:11:11</BeginDate> </Request> <Info> <Index>0</Index> <Prev>-1</Prev> <Next>-1</Next> <Count>2</Count> <Error>false</Error> <Date>20070914</Date> <Id>pl_00001</Id> </Info></RequestList> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/requestdetail | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Display the details of request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Request> GET /pipelineapi/requestdetail/xml?requestid=pl_00027-20091127_20-000001&requestlog=true&applog=true HTTP/1.1 Cookie: SESSIONID=0FDF71FD697841368C45AA76C47AC128 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:38080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 3858 Server: ASTERIA HTTP Daemon/1.01 Date: Sun, 29 Nov 2009 07:16:54 GMT Connection: close Set-Cookie: SESSIONID=0FDF71FD697841368C45AA76C47AC128;Path=/ <?xml version="1.0" encoding="UTF-8"?> <RequestDetail> <RequestId>pl_00027-20091127_20-000001</RequestId> <PipelineId>pl_00027</PipelineId> <Name>EndPipeline</Name> <Status>Finish</Status> <Stage>Complete</Stage> <BeginTime>2009-11-27 08:13:52</BeginTime> <EndTime>2009-11-27 08:13:52</EndTime> <SensorTime>00:00</SensorTime> <FilterTime>00:00</FilterTime> <JointTime>00:00</JointTime> <SensorFile><![CDATA[ Enter the Sensor file contents here. ]]></SensorFile> <FileSize>3.8KB</FileSize> <RequestLog> // When requestlog=true <Log> <Date>2009/11/27 20:13:52</Date><Stage></Stage><Event>Start</Event> <Status>Start</Status><ActionOrder>0</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Sensor</Stage><Event>Start</Event> <Status>Process</Status><ActionOrder>0</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Sensor</Stage><Event>Start</Event> <Status>Process</Status><ActionOrder>1</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Sensor</Stage><Event>End</Event> <Status>Process</Status><ActionOrder>1</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Sensor</Stage><Event>End</Event> <Status>Process</Status><ActionOrder>0</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Filter</Stage><Event>Start</Event> <Status>Process</Status><ActionOrder>0</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Filter</Stage><Event>End</Event> <Status>Process</Status><ActionOrder>0</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Joint</Stage><Event>Start</Event> <Status>Process</Status><ActionOrder>0</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Joint</Stage><Event>Start</Event> <Status>Process</Status><ActionOrder>1</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Joint</Stage><Event>End</Event> <Status>Process</Status><ActionOrder>1</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage>Joint</Stage><Event>End</Event> <Status>Process</Status><ActionOrder>0</ActionOrder><Message></Message> </Log> <Log> <Date>2009/11/27 20:13:52</Date><Stage></Stage><Event>End</Event> <Status>Finish</Status><ActionOrder>0</ActionOrder><Message></Message> </Log> </RequestLog> <AppLog> // When applog=true <Log> <Index>2</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> Start sending the Sensor request.: pl_00027-20091127_20-000001</Message> </Log> <Log> <Index>3</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> Finished sending Sensor request.: pl_00027-20091127_20-000001</Message> </Log> <Log> <Index>4</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> Start executing Processor.: Filter</Message> </Log> <Log> <Index>5</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> Finished executing Processor.: Filter</Message> </Log> <Log> <Index>6</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> Start executing Processor.: Joint</Message> </Log> <Log> <Index>7</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> The initialization of Joint action is finished.: postFileDataAction</Message> </Log> <Log> <Index>8</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> Start executing the Joint action.: postFileDataAction</Message> </Log> <Log> <Index>9</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> The execution of Joint action is finished.: postFileDataAction</Message> </Log> <Log> <Index>10</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> The processing of Joint action is finished.: postFileDataAction</Message> </Log> <Log> <Index>11</Index><Date>20:13:52</Date><Type>INFO</Type> <Message> The execution of Processor is finished.: Joint</Message> </Log> </AppLog> </RequestDetail> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/requestretry | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Retry the request of pipeline which occurs errors | ||||||||||||||||
|
| |||||||||||||||||
<Request>
PUT /pipelineapi//requestretry/xml HTTP/1.1
X-Pipelinewebapi: 1d1687d0-ec6e-4a78-ad66-be9c024c34f1-0deafe00f429d31e0f62ff2baaf5789d
Connection: close
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 37
Host: 192.168.5.165:38080
requestid=pl_00007-20070914_02-000002
<Response>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Content-Length: 118
Server: ASTERIA HTTP Daemon/1.01
Connection: close
Date: Thu, 13 Sep 2007 17:57:30 GMT
<?xml version="1.0" encoding="UTF-8"?>
<ExecuteResponse>
<Status>OK</Status>
<Message>Success</Message>
</ExecuteResponse>
|
|||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/requestcancel | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Cancel the pipeline request and make the request in stopped status | ||||||||||||||||
|
| |||||||||||||||||
<Request>
DELETE //pipelineapi//requestcancel/xml HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: 192.168.5.165:38080
User-Agent: libwww-perl/5.805
Content-Type: application/x-www-form-urlencoded
X-PIPELINEWEBAPI: 1d1687d0-ec6e-4a78-ad66-be9c024c34f1-0deafe00f429d31e0f62ff2baaf5789d
Content-Length: 37
requestid=pl_00007-20070914_02-000003
<Response>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Content-Length: 118
Server: ASTERIA HTTP Daemon/1.01
Connection: close
Date: Thu, 13 Sep 2007 17:57:30 GMT
<?xml version="1.0" encoding="UTF-8"?>
<ExecuteResponse>
<Status>OK</Status>
<Message>Success</Message>
</ExecuteResponse>
|
|||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/resume | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Make the pipeline in started status | ||||||||||||||||
|
| |||||||||||||||||
<Request> PUT /pipelineapi/resume/xml HTTP/1.1 Cookie: SESSIONID=12CABF8561C14661AD26ED41F2913A97 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:38080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Content-Length: 19 pipelineid=pl_00001 <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 118 Server: ASTERIA HTTP Daemon/1.01 Connection: close Date: Fri, 24 Apr 2009 09:18:22 GMT Set-Cookie: SESSIONID=12CABF8561C14661AD26ED41F2913A97;Path=/ <?xml version="1.0" encoding="UTF-8"?> <ExecuteResponse> <Status>OK</Status> <Message>Success</Message> </ExecuteResponse> |
|||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/suspend | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Make the pipeline in suspended status | ||||||||||||||||
|
| |||||||||||||||||
<Request> PUT /pipelineapi/suspend/xml HTTP/1.1 Cookie: SESSIONID=1132A6383FDD4A898039DECA238348D1 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:38080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Content-Length: 19 pipelineid=pl_00001 <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 118 Server: ASTERIA HTTP Daemon/1.01 Connection: close Date: Fri, 24 Apr 2009 09:21:52 GMT Set-Cookie: SESSIONID=1132A6383FDD4A898039DECA238348D1;Path=/ <?xml version="1.0" encoding="UTF-8"?> <ExecuteResponse> <Status>OK</Status> <Message>Success</Message> </ExecuteResponse> |
|||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/version | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Retrieve version information | ||||||||||||||
|
| |||||||||||||||
<Request> GET /pipelineapi/version/xml HTTP/1.1 Cookie: SESSIONID=4C46A49937784AD39FFB87B3C6FE4AD3 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:38080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 177 Server: ASTERIA HTTP Daemon/1.01 Date: Fri, 24 Apr 2009 09:46:06 GMT Connection: close Set-Cookie: SESSIONID=4C46A49937784AD39FFB87B3C6FE4AD3;Path=/ <?xml version="1.0" encoding="UTF-8"?> <Response> <Version>String of product version</Version> </Response> |
|||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/systemdb | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Retrieve table list of system DB, table contents | ||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||
<List of table names:Request> GET /pipelineapi/systemdb/xml?pagesize=50 HTTP/1.1 Cookie: SESSIONID=0388A6BB154845F9B619C1B015008CBC User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:38080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <List of table names:Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 317 Server: ASTERIA HTTP Daemon/1.01 Date: Fri, 24 Apr 2009 09:40:18 GMT Connection: close Set-Cookie: SESSIONID=0388A6BB154845F9B619C1B015008CBC;Path=/ <?xml version="1.0" encoding="UTF-8"?> <Result> <Info> <Index>0</Index> <Prev>-1</Prev> <Next>-1</Next> <Count>3</Count> </Info> <Header> <Item>tablename</Item> </Header> <Record><Item>ACTIVEMQ_ACKS</Item></Record> <Record><Item>ACTIVEMQ_LOCK</Item></Record> <Record><Item>ACTIVEMQ_MSGS</Item></Record> <Status>OK</Status> </Result> <Table contents:Request> GET /pipelineapi/systemdb/xml?tablename=ACTIVEMQ_LOCK&pagesize=50 HTTP/1.1 Cookie: SESSIONID=3855E48A2FD342E18EDEEB1FF810AB88 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:38080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <Table contents:Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 423 Server: ASTERIA HTTP Daemon/1.01 Date: Fri, 24 Apr 2009 09:48:29 GMT Connection: close Set-Cookie: SESSIONID=3855E48A2FD342E18EDEEB1FF810AB88;Path=/ <?xml version="1.0" encoding="UTF-8"?> <Result> <Info> <Index>0</Index> <Prev>-1</Prev> <Next>-1</Next> <Count>1</Count> </Info> <Header> <Item><Name>ID</Name><Type>BIGINT</Type><Key>false</Key></Item> <Item><Name>TIME</Name><Type>BIGINT</Type><Key>false</Key></Item> <Item><Name>BROKER_NAME</Name><Type>VARCHAR</Type><Key>false</Key></Item> </Header> <Record> <Item>1</Item> <Item isnull="true" /> <Item isnull="true" /> </Record> <Status>OK</Status> </Result> |
|||||||||||||||||||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/statusdb | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Retrieve table list of system DB, table contents | ||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||
<List of Table names:Request> GET /pipelineapi/statusdb/xml?pagesize=50 HTTP/1.1 Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:35080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <List of Table names:Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 232 Server: ASTERIA HTTP Daemon/1.01 Date: Sat, 16 May 2009 06:54:30 GMT Connection: close Set-Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521;Path=/ <?xml version="1.0" encoding="UTF-8"?> <Result> <Info> <Index>0</Index><Prev>-1</Prev><Next>-1</Next><Count>1</Count> </Info> <Header> <Item>tablename</Item> </Header> <Record> <Item>STATUS20090516</Item> </Record> <Status>OK</Status> </Result> <Table contents:Request> GET /pipelineapi/statusdb/xml?tablename=STATUS20090516&pagesize=50 HTTP/1.1 Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:35080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <Table contents:Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 1029 Server: ASTERIA HTTP Daemon/1.01 Date: Sat, 16 May 2009 06:56:41 GMT Connection: close Set-Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521;Path=/ <?xml version="1.0" encoding="UTF-8"?> <Result> <Info> <Index>0</Index><Prev>-1</Prev><Next>-1</Next><Count>2</Count> </Info> <Header> <Item><Name>REQUESTID</Name><Type>VARCHAR</Type><Key>false</Key></Item> <Item><Name>PIPELINEID</Name><Type>VARCHAR</Type><Key>false</Key></Item> <Item><Name>CREATED</Name><Type>TIMESTAMP</Type><Key>false</Key></Item> <Item><Name>LASTUPDATED</Name><Type>TIMESTAMP</Type><Key>false</Key></Item> <Item><Name>STAGE</Name><Type>VARCHAR</Type><Key>false</Key></Item> <Item><Name>STATUS</Name><Type>VARCHAR</Type><Key>false</Key></Item> <Item><Name>ERRORMSG</Name><Type>VARCHAR</Type><Key>false</Key></Item> <Item><Name>ERROR</Name><Type>INTEGER</Type><Key>false</Key></Item> </Header> <Record> <Item>pl_00009-20090516_15-000001</Item><Item>/pipeline.pl_00009</Item><Item>2009-05-16 15:34:17.841000000</Item> <Item>2009-05-16 15:34:19.247000000</Item><Item></Item><Item>Finish</Item><Item></Item><Item>0</Item> </Record> <Record> <Item>pl_00009-20090516_15-000002</Item><Item>/pipeline.pl_00009</Item> <Item>2009-05-16 15:49:09.379000000</Item><Item>2009-05-16 15:49:10.386000000</Item> <Item></Item><Item>Finish</Item><Item></Item><Item>0</Item> </Record> <Status>OK</Status> </Result> |
|||||||||||||||||||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/actiondb | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Retrieve table list of system DB, table contents | ||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||
<List of table names:Request> GET /pipelineapi/actiondb/xml?pagesize=50 HTTP/1.1 Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:35080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <List of table names:Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 229 Server: ASTERIA HTTP Daemon/1.01 Date: Sat, 16 May 2009 06:40:33 GMT Connection: close Set-Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521;Path=/ <?xml version="1.0" encoding="UTF-8"?> <Result> <Info> <Index>0</Index><Prev>-1</Prev><Next>-1</Next><Count>1</Count> </Info> <Header> <Item>tablename</Item> </Header> <Record> <Item>sampletable</Item> </Record> <Status>OK</Status> </Result> <Table contents:Request> GET /pipelineapi/actiondb/xml?tablename=sampletable&pagesize=50 HTTP/1.1 Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:35080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <Table contents:Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 425 Server: ASTERIA HTTP Daemon/1.01 Date: Sat, 16 May 2009 06:49:16 GMT Connection: close Set-Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521;Path=/ <?xml version="1.0" encoding="UTF-8"?> <Result> <Info> <Index>0</Index><Prev>-1</Prev><Next>-1</Next><Count>2</Count> </Info> <Header> <Item><Name>item1</Name><Type>VARCHAR</Type><Key>false</Key></Item> <Item><Name>item2</Name><Type>VARCHAR</Type><Key>false</Key></Item> <Item><Name>item3</Name><Type>VARCHAR</Type><Key>false</Key></Item> </Header> <Record> <Item>1</Item><Item>2</Item><Item>3</Item> </Record> <Record> <Item>4</Item><Item>5</Item><Item>6</Item> </Record> <Status>OK</Status> </Result> |
|||||||||||||||||||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/pipelinecache | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Clear the cache of pipeline action | ||||||||||||||||
|
| |||||||||||||||||
<Request> DELETE /pipelineapi/pipelinecache/xml?pipelineid=pl_00009&sensor=true&filter=true&joint=true HTTP/1.1 Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:35080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 118 Server: ASTERIA HTTP Daemon/1.01 Connection: close Date: Sat, 16 May 2009 07:01:00 GMT Set-Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521;Path=/ <?xml version="1.0" encoding="UTF-8"?> <ExecuteResponse> <Status>OK</Status> <Message>Success</Message> </ExecuteResponse> |
|||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/deletetable | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Clear the data of action DB tables | ||||||||||||||||
|
| |||||||||||||||||
<Request> DELETE /pipelineapi/deletetable/xml?table=sampletable HTTP/1.1 Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:35080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 140 Server: ASTERIA HTTP Daemon/1.01 Connection: close Date: Sat, 16 May 2009 07:03:51 GMT Set-Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521;Path=/ <?xml version="1.0" encoding="UTF-8"?> <ExecuteResponse> <Status>OK</Status> <Message>Success</Message> <RowCount>2</RowCount> </ExecuteResponse> |
|||||||||||||||||
| URL | http://[hostname]:[port]/pipelineapi/droptable | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | Drop the tables of action DB | ||||||||||||||||
|
| |||||||||||||||||
<Request> DELETE /pipelineapi/droptable/xml?table=sampletable HTTP/1.1 Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521 User-Agent: CoordinatorClient/1.0 Connection: close Content-Type: application/x-www-form-urlencoded Host: localhost:35080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 <Response> HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 Content-Length: 140 Server: ASTERIA HTTP Daemon/1.01 Connection: close Date: Sat, 16 May 2009 07:06:16 GMT Set-Cookie: SESSIONID=6161A03E2D7B48A6AA9E9F6C846EE521;Path=/ <?xml version="1.0" encoding="UTF-8"?> <ExecuteResponse> <Status>OK</Status> <Message>Success</Message> <RowCount>0</RowCount> </ExecuteResponse> |
|||||||||||||||||
API Kit set can be downloaded from the link.
apikit-0.0.1.zip: version 0.0.1module API
{
// Client
interface Client {
// Send request using GET method
ResponseResult get( url , data ) ;
ResponseResult get( url , data , headers ) ;
// Send request using POST method
ResponseResult post( url , data ) ;
ResponseResult post( url , data , headers ) ;
// Send request using PUT method
ResponseResult put( url , data ) ;
ResponseResult put( url , data , headers ) ;
// Send request using DELETE method
ResponseResult delete( url , data ) ;
ResponseResult delete( url , data , headers ) ;
}
// Response object
interface ResponseResult {
// response
int status() ; // Integer representing either OK, Error , SystemError or Unknown
int format() ; // Integer representing either XML, Json , Html or Unknown
Object response() ; // Objects combined with different content types
string text() ; // String of response body
}
}
All kits are BSD License.
Response of ResponseResult is hold in each of the content types below,
#!/usr/bin/ruby
require 'asteria'
api_key = '1d1687d0-ec6e-4a78-ad66-be9c024c34f1-0deafe00f429d31e0f62ff2baaf5789d'
api = ASTERIA::Client.new( api_key , '192.168.5.165' , 25080 )
xmlresult = api.get( "/list/xml" , "" )
print "#{xmlresult.text}"
Response of ResponseResult is hold in each of the content types below,
#!/usr/bin/perl
use ASTERIA::Client ;
$api_key = "1d1687d0-ec6e-4a78-ad66-be9c024c34f1-0deafe00f429d31e0f62ff2baaf5789d" ;
$apiclient = ASTERIA::Client->new( { license => $api_key , hostname => "192.168.5.165" , port => 25080 } );
$result = $apiclient->post( "/exec/xml" , { pipelineid => "pl_00001" , filename => "plrun.dat" } ) ;
$txt = $result->text ;
print "$txt" ;
Response of ResponseResult is hold in each of the content types below,
import com.infoteria.asteria.net.http.speaker.Client ;
import com.infoteria.asteria.net.http.speaker.ClientException ;
import com.infoteria.asteria.net.http.speaker.ResponseResult ;
public class Sample {
public static void main( String[] args ) throws ClientException {
String key = "1d1687d0-ec6e-4a78-ad66-be9c024c34f1-0deafe00f429d31e0f62ff2baaf5789d" ;
String host = "192.168.5.165" ;
int port = 25080 ;
Client client = new Client( key , host , port ) ;
try {
ResponseResult result = client.get( "/list/xml" , null ) ;
String text = result.getText() ;
System.out.println( text ) ;
} catch ( ClientException e ) {
e.printStackTrace() ;
}
}
}
Flow component sample of pipeline API can be used by the procedure below.
Copy flowpipelineapi.jar of java kit to [Install Dir]/flow/lib/flowlib.
Download file of component copied in Designer. After downloading, restart the Designer.
|
|
Executed result contents
Response of ResponseResult is hold in each of the content types below,
<?php include_once 'client.php'; $apikey = ""; $host ="192.168.5.165" ; $port = 38080 ; $apiclient = new Client( $apikey , $host , $port ) ; $result = $apiclient->get( "/list" ) ; echo $result->text ; ?>