Pipeline API


Summary

Getting Started

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.

Enable the API settings of pipeline service

  1. Login pipeline service using pipeline coordinator.
  2. Display "Environment Settings" of "Settings" tag.
  3. Display "API Settings" tag in "Environment Setting" page.
  4. Choose "Enable" in "API Settings", and click the "Update" button.

When enabled API Settings at the first time, API key is issued, and will be displayed in the bottom "API Key" field.

Get API Key

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.

Use API Key

When using API, please set X-Pipelinewebapi:API Key to http header.

Request

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.

Response

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)

Response is XML

<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>

Response is JSON

<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"}
        ]
     }
}

Response is HTML

<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>

Explanatory Notes

The explanatory notes of API list are as follows.
URL URL of API
Description Description of API
Request Parameters that can be set in request
Response Description of response note

API List

Retrieve pipeline list

URLhttp://[hostname]:[port]/pipelineapi/list
DescriptionReturn the list of all pipelines

Requestget:Method
ParameterDescription
---There are no parameters that can be specified
Response
NoteDescription
PipelineListBe the root element
PipeLineSet element of pipeline information
IdPipeline ID
NamePipeline name
Runmoderun:start status, stop:stop status
CreatedatePipeline created date
UpdatedatePipeline updated date
DescriptionDescription of pipeline
ArgsRequest variable
ItemField Item of request variable
NameName of request variable
ValueDefault value of Request variable

<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>

Execute Pipeline

URLhttp://[hostname]:[port]/pipelineapi/exec
DescriptionExecute Pipeline. Specify the pipeline to execute by id.

Requestpost:Method
ParameterDescription
pipelineidThe ID of pipeline to execute
othersOther parameters will be passed to pipeline as request argument
Response
NoteDescription
ExecuteResponseBe root element
StatusOK:when succeeded, Failed:when failed
MessageEnter messages

<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>

Request list

URLhttp://[hostname]:[port]/pipelineapi/requestlist
DescriptionReturn the list of request

Requestget:Method
ParameterDescription
idSpecify the ID of pipeline to display
dateSpecify the date showed in the format of yyyyMMdd
errorDisplay the request of error status
indexSpecify the start No. of request list
pagesizeSpecify the number of requests to retrieve at one time
Response
NoteDescription
RequestListBe root element
RequestIdRequest ID
PipelineIdPipeline ID
NamePipeline name
StatusRequest is set
StartStart
WaitProcessWait to be executed
ProcessProcess
CancelCancel
FinishFinish
StopStop and finish
WaitAutoRetryWait to be auto-retried
WaitManualRetryWait to be manual-retried
ErrorError
Please refer to pipeline service manual for details
StageCurrent stage is finished (If there is no current stage, Complete will be set)
BeginTimeBegin time to process pipeline
InfoInformation
IndexNo. of the heading request information
PrevNo. of the one page previous of the response data
NextNo. of the one page next to the response data
CountCount of the request information retrieved
ErrorWhether only to display the errors
DateSpecified date
IdSpecified pipeline ID

<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>

Request details

URLhttp://[hostname]:[port]/pipelineapi/requestdetail
DescriptionDisplay the details of request

Requestget:Method
ParameterDescription
requestidSpecify the ID of request to retrieve the details
requestlogSpecify true when retrieving the request log
applogSpecify true when retrieving the application log
Response
NoteDescription
RequestDetailBe root element
RequestIdRequest ID
PipelineIdPipeline ID
NamePipeline name
StatusStatus is set
StartStart
WaitProcessWait to be executed
ProcessProcess
CancelCancel
FinishFinish
StopStop and finish
WaitAutoRetryWait to be auto-retried
WaitManualRetryWait to be manual-retried
ErrorError
Please refer to pipeline service manual for details
StageCurrent stage is finished (If there is no current stage, Complete will be set)
BeginTimeBegin time to process pipeline
EndTimeEnd time of pipeline
SensorTimeTime to process Sensor stage
FilterTimeTime to process Filter stage
JointTimeTime to process Joint stage
SensorFileFile contents of Sensor action
FileSizeFile size of Sensor action
RequestLogRequest log
LogOne log
DateDate
StageStage
EventEvent type
StatusStatus
ActionOrderAction No.
MessageMessage
AppLogApplication log
IndexLine No.
DateDate
TypeLog type
MessageMessage

<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>

Retry

URLhttp://[hostname]:[port]/pipelineapi/requestretry
DescriptionRetry the request of pipeline which occurs errors

Requestput:Method
ParameterDescription
requestidSpecify the request ID of the pipeline to retry
Response
NoteDescription
ExecuteResponseBe root element
StatusOK:when succeeded, Failed:when failed
MessageEnter messages

<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>

Cancel request

URLhttp://[hostname]:[port]/pipelineapi/requestcancel
DescriptionCancel the pipeline request and make the request in stopped status

Requestdelete:Method
ParameterDescription
requestidSpecify the ID of request to cancel
Response
NoteDescription
ExecuteResponseBe root element
StatusOK:when succeeded, Failed:when failed
MessageEnter messages

<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>

Start pipeline

URLhttp://[hostname]:[port]/pipelineapi/resume
DescriptionMake the pipeline in started status

Requestput:Method
ParameterDescription
pipelineidSpecify the pipeline ID
Response
NoteDescription
ExecuteResponseBe root element
StatusOK:when succeeded, Failed:when failed
MessageEnter messages

<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>

Suspend pipeline

URLhttp://[hostname]:[port]/pipelineapi/suspend
DescriptionMake the pipeline in suspended status

Requestput:Method
ParameterDescription
pipelineidSpecify pipeline ID
Response
NoteDescription
ExecuteResponseBe root element
StatusOK:when succeeded, Failed:when failed
MessageEnter messages

<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>

Version

URLhttp://[hostname]:[port]/pipelineapi/version
DescriptionRetrieve version information

Requestget:Method
ParameterDescription
---There are no parameters can be specified
Response
NoteDescription
ResponseBe root element
VersionVersion information of the product

<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>

Search system DB

URLhttp://[hostname]:[port]/pipelineapi/systemdb
DescriptionRetrieve table list of system DB, table contents

Requestget:Method
ParameterDescription
tablenameSpecify table name. Do not specify when retrieving the table list.
offsetOffset index
pagePage size
Response
NoteDescription
ResultBe root element
InfoInformation
IndexNo. of the heading request information
PrevNo. of the one page previous of the response data
NextNo. of the one page next to the response data
CountCount of the request information retrieved
HeaderTable definition information
RecordRecord information
StatusStatus

<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>

Search status DB

URLhttp://[hostname]:[port]/pipelineapi/statusdb
DescriptionRetrieve table list of system DB, table contents

Requestget:Method
ParameterDescription
tablenameSpecify table name. Do not specify when retrieving the table list.
offsetOffset index
pagePage size
Response
NoteDescription
ResultBe root element
InfoInformation
IndexNo. of the heading request information
PrevNo. of the one page previous of the response data
NextNo. of the one page next to the response data
CountCount of the request information retrieved
HeaderTable definition information
RecordRecord information
StatusStatus

<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>

Search action DB

URLhttp://[hostname]:[port]/pipelineapi/actiondb
DescriptionRetrieve table list of system DB, table contents

Requestget:Method
ParameterDescription
tablenameSpecify table name. Do not specify when retrieving the table list.
offsetOffset index
pagePage size
Response
NoteDescription
ResultBe root element
InfoInformation
IndexNo. of the heading request information
PrevNo. of the one page previous of the response data
NextNo. of the one page next to the response data
CountCount of the request information retrieved
HeaderTable definition information
RecordRecord information
StatusStatus

<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>

Clear the cache of pipeline action

URLhttp://[hostname]:[port]/pipelineapi/pipelinecache
DescriptionClear the cache of pipeline action

Requestdelete:Method
ParameterDescription
pipelineidSpecify pipeline ID
Response
NoteDescription
ExecuteResponseBe root element
StatusOK:when succeeded, Failed:when failed
MessageEnter messages

<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>

Clear action DB tables

URLhttp://[hostname]:[port]/pipelineapi/deletetable
DescriptionClear the data of action DB tables

Requestdelete:Method
ParameterDescription
pipelineidSpecify pipeline ID
Response
NoteDescription
ExecuteResponseBe root element
StatusOK:when succeeded, Failed:when failed
MessageEnter messages

<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>

Drop action DB tables

URLhttp://[hostname]:[port]/pipelineapi/droptable
DescriptionDrop the tables of action DB

Requestdelete:Method
ParameterDescription
pipelineidSpecify pipeline ID
Response
NoteDescription
ExecuteResponseBe root element
StatusOK:when succeeded, Failed:when failed
MessageEnter messages

<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 Client

API Kit

API Kit set can be downloaded from the link.

apikit-0.0.1.zip: version 0.0.1

Interface of client

module 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
    }

}

License

All kits are BSD License.

Ruby

Response of ResponseResult is hold in each of the content types below,

Execution Sample of Ruby

#!/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}"

Perl

Response of ResponseResult is hold in each of the content types below,

Execution Sample of Perl

#!/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" ;

Java

Response of ResponseResult is hold in each of the content types below,

Execution Sample of Java


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.

Setp1 :: Copy Jar to flowlib

Copy flowpipelineapi.jar of java kit to [Install Dir]/flow/lib/flowlib.

Setp2 :: Synchronize in design side

Download file of component copied in Designer. After downloading, restart the Designer.

Setp3 :: Create Flow
Setp4 :: Execute Flow

Executed result contents

PHP

Response of ResponseResult is hold in each of the content types below,

Execution sample of PHP

<?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 ;

?>

[ TOP ]