管理 API の概要。API は、Cloudおよび統合アプライアンスの管理機能を提供します。
管理 API は Web サービスとして実装されます。この Web サービスは、アプリケーションまたはスクリプトを通じて WebSphere® DataPower® Cast Iron® Appliance (統合アプライアンス) および WebSphere Cast Iron Cloud (Cloud) プロジェクトを管理する方法を提供します。
API は、以下の領域での統合アプライアンスおよび Cloud の管理を提供します。
管理 API は、以下の Web サービス標準に準拠します。
統合アプライアンスおよび Cloud プロジェクトを管理およびモニターするための Web サービス操作を呼び出すクライアント・アプリケーションを作成できます。クライアント・アプリケーションと統合アプライアンスまたは Cloud プロジェクトとの間の通信は、 HTTP または HTTPS を使用して達成されます。
管理 API は WSDL ファイルに定義されています。クライアント・アプリケーションは、SOAP メッセージを送信することによって Web サービス操作を呼び出します。SOAP メッセージは XML にフォーマット設定されていないため、プログラミング言語中立です。
このセクションでは、管理 API - セキュリティー WSDL を使用して、ログインし、ユーザーを取得し、ログアウトする例を提供します。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sec="http://www.approuter.com/schemas/2008/1/security">
<soapenv:Header/>
<soapenv:Body>
<sec:login>
<sec:username>webuser@mycompany.com</sec:username>
<sec:password>D3nu9noB</sec:password>
</sec:login>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:loginResponse xmlns:ns2="http://www.approuter.com/schemas/2008/1/
security" xmlns:ns3="http://www.approuter.com/schema/router/1000/security/03">
<ns2:sessionId>8F059BEEA3611033D277773A95404641</ns2:sessionId>
</ns2:loginResponse>
</S:Body>
</S:Envelope>
sessionId は、統合アプライアンスまたは Cloud にログインした後で他の SOAP 操作を実行するために必要です。<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sec="http://www.approuter.com/schemas/2008/1/security">
<soapenv:Header>
<sec:sessionId>8F059BEEA3611033D277773A95404641</sec:sessionId>
</soapenv:Header>
<soapenv:Body>
<sec:getUser>
<sec:username>webuser</sec:username>
</sec:getUser>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getUserResponse xmlns:ns2="http://www.approuter.com/schemas/2008/1/
security" xmlns:ns3="http://www.approuter.com/schema/router/1000/security/03">
<ns2:user>
<ns3:id>8F059BEEA3611033D277773A95404641</ns3:id>
<ns3:name>webuser</ns3:name>
<ns3:encPasswd>{SHA}clO20r2ZJMJcDrNwXQzhWB8YcdI=</ns3:encPasswd>
<ns3:displayName>WebServiceUser</ns3:displayName>
<ns3:isActive>true</ns3:isActive>
<ns3:isMutable>true</ns3:isMutable>
<ns3:isVisible>true</ns3:isVisible>
<ns3:email>webuser@mycompany.com</ns3:email>
<ns3:createdTime>2010-03-02T22:11:32.935Z</ns3:createdTime>
<ns3:failedLoginCount>0</ns3:failedLoginCount>
<ns3:scopeId>B47EAECF6AD14AA028B4EA038CB742D0</ns3:scopeId>
<ns3:scopeType>Tenant</ns3:scopeType>
</ns2:user>
</ns2:getUserResponse>
</S:Body>
</S:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sec="http://www.approuter.com/schemas/2008/1/security">
<soapenv:Header>
<sec:sessionId>8F059BEEA3611033D277773A95404641</sec:sessionId>
</soapenv:Header>
<soapenv:Body>
<sec:logout/>
</soapenv:Body>
</soapenv:Envelope>
前の例では、Cloud または統合アプライアンスのテナントで実行された SOAP 操作を使用しました。Cloud のテナント内の環境で操作を実行するには、setCurrentScope 操作を使用して、SOAP 操作を実行する環境にスコープを設定します。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sec="http://www.approuter.com/schemas/2008/1/security">
<soapenv:Header>
<sec:sessionId>63Y93HD6D856EB5812EB71216C3547W7</sec:sessionId>
</soapenv:Header>
<soapenv:Body>
<sec:setCurrentScope>
<sec:scopeName>Development</sec:scopeName>
</sec:setCurrentScope>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:setCurrentScopeResponse xmlns:ns2="http://www.approuter.com/
schemas/2008/1/security" xmlns:ns3="http://www.approuter.com/schema/
router/1000/security/03">
<ns2:success>true</ns2:success>
</ns2:setCurrentScopeResponse>
</S:Body>
</S:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dep="http://www.approuter.com/schemas/2008/1/deployment">
<soapenv:Header>
<dep:sessionId>63Y93HD6D856EB5812EB71216C3547W7</dep:sessionId>
</soapenv:Header>
<soapenv:Body>
<dep:start>
<dep:projectName>HTTP_363i</dep:projectName>
<dep:version>1.0</dep:version>
<dep:configName>HTTP_363j</dep:configName>
</dep:start>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:startResponse xmlns:ns2="http://www.approuter.com/schemas/2008/1/
deployment" xmlns:ns3="http://www.approuter.com/schemas/2008/1/deployment/
types" xmlns:ns4="http://www.approuter.com/schema/router/1000/security/03"
xmlns:ns5="http://www.approuter.com/schemas/2008/1/util/types">
<ns2:success>true</ns2:success>
</ns2:startResponse>
</S:Body>
</S:Envelope>