パイプラインAPI


概要

はじめに

パイプラインAPIとは、パイプラインサービスの特定の機能をさまざまな言語からhttp経由で呼び出すためのAPIです。
パイプラインAPIを使用するためには、パイプラインサービスのAPI設定が有効である必要があります。また、パイプラインサービスで発行したAPIキーが必要です。

パイプラインサービスのAPI設定を有効にする

  1. パイプラインサービスにパイプラインコーディネーターでログインします。
  2. 「Settings」タブの「環境設定」を表示します。
  3. 「環境設定」画面で「API設定」タブを表示します。
  4. 「API設定」項目で「有効にする」を選択し、「更新」ボタンをクリックします。
    4.3以前のものは再起動が必要になります

初めてAPI設定を有効にした場合はAPIキーが発行され、下部「APIキー」項目に表示されます。

APIキーを入手する

初めてAPIキーを発行する場合は、上記「パイプラインサービスのAPI設定を有効にする」の手順で発行されます。APIキーを再発行する場合は、上記手順を参考にしてパイプラインコーディネーターで「API設定」画面を表示し、下部にある「APIキー」項目の「更新」ボタンをクリックします。「APIキー」項目に新しいAPIキーが表示されます。

APIキーを使用する

APIを使用する時に、httpヘッダにX-Pipelinewebapi:APIキーを設定してください。

リクエスト

リクエストのURLは以下のような形式です。

http://[ホスト名]:[ポート番号]/pipelineapi/[API指定]/[レスポンスタイプ]
ホスト名 パイプラインサービスのホスト名を指定します。
ポート番号 パイプラインサービスのポート番号を指定します。インストール時のデフォルト値は25080です。インストール時に変更した場合は、変更したポート番号を指定してください。
API指定 実行するパイプラインAPIのパスを指定します。APIリストのURLの項目を参照してください。
レスポンスタイプ xml,json,htmのいずれかを指定します。
パイプラインサービスが返すレスポンスは、XML(text/xml), JSON(text/javascript) ,HTML(text/html)の3つのコンテントタイプがあります。省略可能で、省略した場合はXMLになります。

それぞれのAPIサービスを使用するにはHTTPメソッドを指定します。

レスポンス

リクエストで指定されたレスポンスタイプ(XML,JSON,HTML)のいずれかの形式で返ります。
例えば、パイプライン一覧取得(list)のリクエストに対するレスポンスはそれぞれ以下のようになります。(サーバーアドレスはhostname、ポート番号は25080とします)

レスポンスがXML

<リクエストURL>
http://hostname:25080/pipelineapi/list/xml
<?xml version="1.0" encoding="UTF-8"?>
<PipelineList>
  <PipeLine>
    <Id>pl_00001</Id><Name>パイプラインーサンプル</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>パイプライン-テスト</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>新規パイプライン</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>新規パイプライン</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>

レスポンスがJSON

<リクエストURL>
http://hostname:25080/pipelineapi/list/json
{"PipelineList":
     {"PipeLine":
        [
         {"Name":"パイプラインーサンプル","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":"パイプライン-テスト","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":"新規パイプライン","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":"新規パイプライン","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"}
        ]
     }
}

レスポンスがHTML

<リクエストURL>
http://hostname:25080/pipelineapi/list/htm
<?xml version="1.0" encoding="UTF-8"?>
<table>
<tr>
<td>pl_00001</td><td>パイプラインーサンプル</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>新規パイプライン</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>

凡例

APIリストの凡例は以下になります。

URL APIのURL
説明 APIの説明
リクエスト リクエストで設定できるパラメータ
レスポンス レスポンスノードの説明

更新履歴

更新履歴になります。

バージョン 内容
0.0.1 作成
0.0.2 WSHのキットを追加、ヘルプの更新をしました
0.0.3 CoordinatorClientのキットを追加、新規にAPIを追加しました

APIリスト

パイプライン一覧取得

URLhttp://[hostname]:[port]/pipelineapi/list
Client Argument URL/list
説明パイプライン一覧のリストを返します

リクエストget:メソッド
パラメータ説明
---指定できるパラメータはありません
レスポンス
ノード説明
PipelineListルートエレメントになります
PipeLineパイプライン情報セットエレメント
IdパイプラインID
Nameパイプライン名
Runmoderun:開始状態、stop:停止状態
Createdateパイプライン作成日付
Updatedateパイプライン更新日付
Descriptionパイプラインの説明
Argsリクエスト変数
Itemリクエスト変数フィールドItem
Nameリクエスト変数名
Valueリクエスト変数デフォルト値

<リクエスト>
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

<レスポンス>
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>パイプラインーサンプル</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>パイプライン-テスト</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>新規パイプライン</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>

[ TOP ]

パイプライン実行

URLhttp://[hostname]:[port]/pipelineapi/exec
Client Argument URL/exec
説明パイプラインを実行します。idで実行するパイプラインを指定します

リクエストpost:メソッド
パラメータ説明
pipelineid実行するパイプラインのパイプラインID
othersそのほかのパラメータはすべてリクエスト引数としてパイプラインに渡します
レスポンス
ノード説明
ExecuteResponseルートエレメントになります
StatusOK:成功時、Failed:失敗時
Messageメッセージが入ります

<リクエスト>
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


<レスポンス>
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>

[ TOP ]

リクエスト一覧

URLhttp://[hostname]:[port]/pipelineapi/requestlist
Client Argument URL/requestlist
説明リクエストの一覧を返します

リクエストget:メソッド
パラメータ説明
id表示したいパイプラインIDを指定します
dateyyyyMMddの形式で表示する日付を指定します
errorエラー状態のリクエストを表示します
indexリクエスト一覧の開始番号を指定します
pagesize一度に取得するリクエスト情報数を指定します
レスポンス
ノード説明
RequestListルートエレメントになります
RequestIdリクエストID
PipelineIdパイプラインID
Nameパイプライン名
Statusステータスが設定されます
Start開始
WaitProcess実行待ち
Process実行中
Cancelキャンセル
Finish完了
Stop停止して完了
WaitAutoRetry自動リトライ待ち
WaitManualRetry手動リトライ待ち
Errorエラー
詳細はパイプラインサービスマニュアルを参照してください
Stage現在のステージ完了 (現在のステージがない場合はCompleteが設定されます)
BeginTimeパイプライン処理開始時間
Infoインフォメーション
Index先頭のリクエスト情報の番号
Prevレスポンスデータの1ページ前の番号
Nextレスポンスデータの1ページ次の番号
Count取得したリクエスト情報の件数
Errorエラーのみの表示かどうか
Date指定した日付
Id指定したパイプラインID

<リクエスト>
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

<レスポンス>
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>パイプラインーサンプル</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>パイプラインーサンプル</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>
[ TOP ]

リクエスト詳細

URLhttp://[hostname]:[port]/pipelineapi/requestdetail
Client Argument URL/requestdetail
説明リクエストの詳細を表示します

リクエストget:メソッド
パラメータ説明
requestid詳細を取得するリクエストのIDを指定します
requestlogリクエストログを取得する場合trueを指定します
applogアプリケーションログを取得する場合trueを指定します
レスポンス
ノード説明
RequestDetailルートエレメントになります
RequestIdリクエストID
PipelineIdパイプラインID
Nameパイプライン名
Statusステータスが設定されます
Start開始
WaitProcess実行待ち
Process実行中
Cancelキャンセル
Finish完了
Stop停止して完了
WaitAutoRetry自動リトライ待ち
WaitManualRetry手動リトライ待ち
Errorエラー
詳細はパイプラインサービスマニュアルを参照してください
Stage現在のステージ完了 (現在のステージがない場合はCompleteが設定されます)
BeginTimeパイプライン処理開始時間
EndTimeパイプライン終了時間
SensorTimeセンサーステージ処理時間
FilterTimeフィルターステージ処理時間
JointTimeジョイントステージ処理時間
SensorFileセンサーアクションのファイル内容
FileSizeセンサーアクションのファイルサイズ
RequestLogリクエストログ
Log1つのログ
Date日付
Stageステージ
Eventイベントタイプ
Statusステータス
ActionOrderアクション番号
Messageメッセージ
AppLogアプリケーションログ
Index行番号
Date日付
Typeログタイプ
Messageメッセージ

<リクエスト>
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

<レスポンス>
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[

センサーファイル内容がここに入ります。

]]></SensorFile>
<FileSize>3.8KB</FileSize>
<RequestLog> // 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>  // applog=trueの場合
<Log>
<Index>2</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> センサーリクエストの送信を開始します。: pl_00027-20091127_20-000001</Message>
</Log>
<Log>
<Index>3</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> センサーリクエストの送信を終了しました。: pl_00027-20091127_20-000001</Message>
</Log>
<Log>
<Index>4</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> Processorの実行を開始します。: Filter</Message>
</Log>
<Log>
<Index>5</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> Processorの実行を終了しました。: Filter</Message>
</Log>
<Log>
<Index>6</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> Processorの実行を開始します。: Joint</Message>
</Log>
<Log>
<Index>7</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> ジョイントアクションの初期化が完了しました。: postFileDataAction</Message>
</Log>
<Log>
<Index>8</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> ジョイントアクションの実行を開始します。: postFileDataAction</Message>
</Log>
<Log>
<Index>9</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> ジョイントアクションの実行が終了しました。: postFileDataAction</Message>
</Log>
<Log>
<Index>10</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> ジョイントアクションの処理が終了しました。: postFileDataAction</Message>
</Log>
<Log>
<Index>11</Index><Date>20:13:52</Date><Type>INFO</Type>
<Message> Processorの実行を終了しました。: Joint</Message>
</Log>
</AppLog>
</RequestDetail>
[ TOP ]

リトライ実行

URLhttp://[hostname]:[port]/pipelineapi/requestretry
Client Argument URL/requestretry
説明エラーが発生しているパイプラインのリクエストに対してリトライをします

リクエストput:メソッド
パラメータ説明
requestidリトライ対象のパイプラインのリクエストIDを指定します
レスポンス
ノード説明
ExecuteResponseルートエレメントになります
StatusOK:成功時、Failed:失敗時
Messageメッセージが入ります

<リクエスト>
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

<レスポンス>
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>
[ TOP ]

リクエストキャンセル

URLhttp://[hostname]:[port]/pipelineapi/requestcancel
Client Argument URL/requestcancel
説明パイプラインのリクエストをキャンセルしてリクエストを停止状態にします

リクエストdelete:メソッド
パラメータ説明
requestidキャンセルするリクエストIDを指定します
レスポンス
ノード説明
ExecuteResponseルートエレメントになります
StatusOK:成功時、Failed:失敗時
Messageメッセージが入ります

<リクエスト>
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

<レスポンス>
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>
[ TOP ]

パイプライン開始

URLhttp://[hostname]:[port]/pipelineapi/resume
Client Argument URL/resume
説明パイプラインを開始状態にします

リクエストput:メソッド
パラメータ説明
pipelineidパイプラインIDを指定します
レスポンス
ノード説明
ExecuteResponseルートエレメントになります
StatusOK:成功時、Failed:失敗時
Messageメッセージが入ります

<リクエスト>
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

<レスポンス>
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>
[ TOP ]

パイプライン停止

URLhttp://[hostname]:[port]/pipelineapi/suspend
Client Argument URL/suspend
説明パイプラインを停止状態にします

リクエストput:メソッド
パラメータ説明
pipelineidパイプラインIDを指定します
レスポンス
ノード説明
ExecuteResponseルートエレメントになります
StatusOK:成功時、Failed:失敗時
Messageメッセージが入ります

<リクエスト>
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

<レスポンス>
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>
[ TOP ]

バージョン

URLhttp://[hostname]:[port]/pipelineapi/version
Client Argument URL/version
説明バージョン情報を取得します

リクエストget:メソッド
パラメータ説明
---指定できるパラメータはありません
レスポンス
ノード説明
Responseルートエレメントになります
Version製品のバージョン情報

<リクエスト>
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

<レスポンス>
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>製品バージョン文字列</Version>
</Response>

[ TOP ]

システムDB検索

URLhttp://[hostname]:[port]/pipelineapi/systemdb
Client Argument URL/systemdb
説明システムDBのテーブル一覧、テーブル内容を取得します

リクエストget:メソッド
パラメータ説明
tablenameテーブル名を指定します。テーブル一覧を取得する場合は指定しません。
offsetオフセットインデックス
pageページサイズ
レスポンス
ノード説明
Resultルートエレメントになります
Infoインフォメーション
Index先頭のリクエスト情報の番号
Prevレスポンスデータの1ページ前の番号
Nextレスポンスデータの1ページ次の番号
Count取得したリクエスト情報の件数
Headerテーブル定義情報
Recordレコード情報
Statusステータス

<テーブル名一覧:リクエスト>
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

<テーブル名一覧:レスポンス>
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>


<テーブル内容:リクエスト>
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

<テーブル内容:レスポンス>
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>
[ TOP ]

ステータスDB検索

URLhttp://[hostname]:[port]/pipelineapi/statusdb
Client Argument URL/statusdb
説明ステータスDBのテーブル一覧、テーブル内容を取得します

リクエストget:メソッド
パラメータ説明
tablenameテーブル名を指定します。テーブル一覧を取得する場合は指定しません。
offsetオフセットインデックス
pageページサイズ
レスポンス
ノード説明
Resultルートエレメントになります
Infoインフォメーション
Index先頭のリクエスト情報の番号
Prevレスポンスデータの1ページ前の番号
Nextレスポンスデータの1ページ次の番号
Count取得したリクエスト情報の件数
Headerテーブル定義情報
Recordレコード情報
Statusステータス

<テーブル名一覧:リクエスト>
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

<テーブル名一覧:レスポンス>
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>

<テーブル内容:リクエスト>
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

<テーブル内容:レスポンス>
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>

[ TOP ]

アクションDB検索

URLhttp://[hostname]:[port]/pipelineapi/actiondb
Client Argument URL/actiondb
説明アクションDBのテーブル一覧、テーブル内容を取得します

リクエストget:メソッド
パラメータ説明
tablenameテーブル名を指定します。テーブル一覧を取得する場合は指定しません。
offsetオフセットインデックス
pageページサイズ
レスポンス
ノード説明
Resultルートエレメントになります
Infoインフォメーション
Index先頭のリクエスト情報の番号
Prevレスポンスデータの1ページ前の番号
Nextレスポンスデータの1ページ次の番号
Count取得したリクエスト情報の件数
Headerテーブル定義情報
Recordレコード情報
Statusステータス

<テーブル名一覧:リクエスト>
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

<テーブル名一覧:レスポンス>
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>

<テーブル内容:リクエスト>
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

<テーブル内容:レスポンス>
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>

[ TOP ]

パイプラインアクションキャッシュクリア

URLhttp://[hostname]:[port]/pipelineapi/pipelinecache
Client Argument URL/pipelinecache
説明パイプラインアクションのキャッシュをクリアします

リクエストdelete:メソッド
パラメータ説明
pipelineidパイプラインIDを指定します
レスポンス
ノード説明
ExecuteResponseルートエレメントになります
StatusOK:成功時、Failed:失敗時
Messageメッセージが入ります

<リクエスト>
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

<レスポンス>
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>

[ TOP ]

アクションDBテーブルクリア

URLhttp://[hostname]:[port]/pipelineapi/deletetable
Client Argument URL/deletetable
説明アクションDBのテーブルのデータをクリアします

リクエストdelete:メソッド
パラメータ説明
pipelineidパイプラインIDを指定します
レスポンス
ノード説明
ExecuteResponseルートエレメントになります
StatusOK:成功時、Failed:失敗時
Messageメッセージが入ります

<リクエスト>
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

<レスポンス>
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>

[ TOP ]

アクションDBテーブルドロップ

URLhttp://[hostname]:[port]/pipelineapi/droptable
Client Argument URL/droptable
説明アクションDBのテーブルをドロップします

リクエストdelete:メソッド
パラメータ説明
pipelineidパイプラインIDを指定します
レスポンス
ノード説明
ExecuteResponseルートエレメントになります
StatusOK:成功時、Failed:失敗時
Messageメッセージが入ります

<リクエスト>
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

<レスポンス>
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>

[ TOP ]

APIクライアント

APIキット

APIキット一式をリンクからダウンロードできます。

apikit-0.0.3.zip: version 0.0.3

APIキットの内容は下記になります。

apikit-0.0.3.zip
    /ruby
       asteria-client-ruby-0.0.3.tar.gz
    /perl
       asteria-client-perl-0.0.3.tar.gz
    /coordinatorclient
       asteria-client-coordinatorclient-0.0.3.zip
    /java
       asteria-client-java-0.0.3.zip
    /wsh
       asteria-client-wsh-0.0.3.zip
    /php
       asteria-client-php-0.0.3.tar.gz

クライアントのインターフェイス

module API
{
	// クライアント
	interface Client {

		// GET メソッドでリクエストを送信
		ResponseResult	get( url , data ) ;
		ResponseResult	get( url , data , headers ) ;
		// POST メソッドでリクエストを送信
		ResponseResult	post( url , data ) ;
		ResponseResult	post( url , data , headers ) ;
		// PUT メソッドでリクエストを送信
		ResponseResult	put( url , data ) ;
		ResponseResult	put( url , data , headers ) ;
		// DELETE メソッドでリクエストを送信
		ResponseResult	delete( url , data ) ;
		ResponseResult	delete( url , data , headers ) ;
	}

	// レスポンスオブジェクト
	interface ResponseResult {
		// response
		int		status() ;  // OK, Error , SystemError , Unknown のいずれかを示す整数値
		int		format() ;  // XML, Json , Html , Unknown のいずれかを示す整数値
		Object		response() ;  // それぞれのコンテントタイプに合わせたObject
		string		text() ;     // レスポンスボディの文字列
	}
}

Client Object

get , Method

GETメソッドでHTTP通信を行います

url はAPIリストにのいずれかのURLを指定します。 EX パイプライン一覧を取得する場合は /list

data はクエリ文字列を指定します。指定方法は言語に依存します

headers はHTTPヘッダに値を設定します。指定方法は言語に依存します

post , Method

POSTメソッドでHTTP通信を行います

urlにはAPIリストにのいずれかのURLを指定します。 EX パイプラインを実行する場合は /exec

data はクエリ文字列を指定します。指定方法は言語に依存します

headers はHTTPヘッダに値を設定します。指定方法は言語に依存します

put , Method

PUTメソッドでHTTP通信を行います

urlにはAPIリストにのいずれかのURLを指定します。 EX パイプラインを開始する場合は /resume

data はクエリ文字列を指定します。指定方法は言語に依存します

headers はHTTPヘッダに値を設定します。指定方法は言語に依存します

delete , Method

DELETEメソッドでHTTP通信を行います

urlにはAPIリストにのいずれかのURLを指定します。 EX アクションのキャッシュをクリアする場合は /pipelinecache

data はクエリ文字列を指定します。指定方法は言語に依存します

headers はHTTPヘッダに値を設定します。指定方法は言語に依存します

ResponseResult Object

status , Method

OK, Error , SystemError , Unknown のいずれかの整数値を返します

format , Method

XML, Json , Html , Unknown のいずれかを示す整数値返します

response , Method

それぞれのコンテントタイプに合わせたObject,結果は言語に依存します

text , Method

レスポンスの文字列を返します。結果は言語に依存します

URL対応表

MethodURLMethodURL
GET
/listパイプライン一覧取得
/requestlistリクエスト一覧
/requestdetailリクエスト詳細
/versionバージョン
/systemdbシステムDB検索
/statusdbステータスDB検索
/actiondbアクションDB検索
POST
/execパイプライン実行
PUT
/requestretryリトライ実行
/resumeパイプライン開始
/suspendパイプライン停止
DELETE
/requestcancelリクエストキャンセル
/pipelinecacheパイプラインアクションキャッシュクリア
/deletetableアクションDBテーブルクリア
/droptableアクションDBテーブルドロップ

ライセンス

全てのキットはBSD ライセンスになります。

Ruby

ResponseResultのresponseは以下のコンテントタイプごとに、

が格納されています。

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

ResponseResultのresponseは以下のコンテントタイプごとに、

が格納されています。

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

ResponseResultのresponseは以下のコンテントタイプごとに、

が格納されています。

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() ;
        }
    }
}

以下の手順でパイプラインAPIのフローコンポーネントサンプルを使用できます。

Setp1 :: Jar をflowlibにコピー

javaキットの中の flowpipelineapi.jar を[Install Dir]/flow/lib/flowlib 以下にコピーします。

Setp2 :: デザイナー側で同期

デザイナーでコピーしたコンポーネントのファイルをダウンロードします。 ダウンロー後、デザイナーを再起動します。

Setp3 :: フローを作成
Setp4 :: フローを実行

実行した結果内容

PHP

ResponseResultのresponseは以下のコンテントタイプごとに、

が格納されています。

PHPの実行サンプル

<?php

include_once 'client.php';

$apikey = "Your License Key";
$host ="192.168.5.165" ;
$port = 25080 ;

$apiclient = new Client( $apikey , $host , $port ) ;

$result = $apiclient->get( "/list" ) ;

echo $result->text ;

?>

WSH

ResponseResultのresponseは以下のコンテントタイプごとに、

が格納されています。

WSHの実行サンプル

<job>
<script language="VBScript" src="client.vbs" />
<script language="VBScript" >
Dim transport ,response

set transport = new Client

transport.License = "your license key"
transport.Host = "192.168.5.165"
transport.ContextPath = "/pipelineapi"
transport.Port = 25080

Set response = transport.GetMethod( "/list" , "" )

WScript.Echo "Status  : " & response.status
WScript.Echo "Format  : " & response.status
WScript.Echo "Content : " & response.response

</script>
</job>

WSHの簡単なサンプル

Dim strXMLDoc
Dim intRet
Dim strURL
Dim strKey
Dim strAPI
Dim objXML
strURL = "http://yourpipelinehostname:25080/pipelineapi/exec"
strKey = "pipelineid=pl_00001"
strAPI = "your license key"

Set objXML = WScript.CreateObject("MSXML2.ServerXMLHTTP")
objXML.open "POST", strURL, False
objXML.setRequestHeader "Content-Type", " application/x-www-form-
urlencoded"
objXML.setRequestHeader "Content-Length", len(strKey)
objXML.setRequestHeader "X-PIPELINEWEBAPI", strAPI
objXML.send strKey
strXMLDoc = objXML.responseText
intRet = objXML.status
MsgBox intRet
MsgBox strXMLDoc
Set objXML = Nothing

[ TOP ]