- Oracle Web Services Manager REST APIOracle Web Services Manager REST API
- ユース・ケース
- トークン属性ルールの管理
- プロキシの構成
プロキシの構成
トークン属性ルールREST APIを使用して、トークン属性ルールのプロキシ構成を表示および管理できます。
cURLコマンドの例では、URL構造を使用しています:
http(s)://host:port/wsm-pmrest/v2/trust/{trustname}/attributerule/proxy
次の方法を使用事例で示します。
-
プロキシの作成
-
プロキシの変更
-
プロキシの表示
-
プロキシの削除
トークン属性ルールRest APIを使用してプロキシ構成を管理するには:
- cURLコマンド・ラインでヘッダーを指定します。
-H Accept:application/json
- 次のコマンドを実行して、信頼できる発行者ドキュメント
myTrustDocument
の発行者www.example.com
のプロキシを設定します:curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{IssuerName}/{Identifier}/proxy
例
curl -i -X POST -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/proxy
「Proxyの作成」を参照してください。
次に、リクエスト本文の例を示します。
{ "proxyhost": "www.proxy.com", "proxyport": "1234" }
次にリクエストの成功を示すレスポンスの例を示します。
{ "STATUSCODE": "20171", "MESSAGE": "Proxy for TokenAttributeRule for issuer \"www.abccompany.com\" and KeyIdentifier \"myidentifier1\" is successfully created." }
- 次のコマンドを実行して、発行者
www.abccompany.com
のポート番号を80
に更新します:curl -i -X PATCH -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{IssuerName}/{Identifier}/proxy
例
curl -i -X PATCH -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/proxy
「Proxyの更新」を参照してください。
次に、リクエスト本文の例を示します。
{ "proxyport": "80" }
次にリクエストの成功を示すレスポンスの例を示します。
{ "STATUSCODE": "20172", "MESSAGE": "Proxy for TokenAttributeRule for issuer \"www.abccompany.com\" and KeyIdentifier \"myidentifier1\" is successfully updated." }
- 次のコマンドを実行して、リポジトリの発行者
www.abccompany.com
のプロキシ構成の詳細を表示します:curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{IssuerName}/{Identifier}/proxy
例
curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/proxy
「Proxyの取得」を参照してください。
次に、レスポンス本文の例を示します:
{ "proxyhost": "www.proxy.com", "proxyport": "80" }
- 次のコマンドを実行して、発行者
example.com
のプロキシを削除します:curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{IssuerName}/{Identifier}/proxy
例
curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/proxy
「Proxyの削除」を参照してください。
次にリクエストの成功を示すレスポンスの例を示します。
{ "STATUSCODE": "20174", "MESSAGE": "Proxy for TokenAttributeRule for issuer \"www.abccompany.com\" and KeyIdentifier \"myidentifier1\" is successfully deleted." }