- Oracle Web Services Manager REST APIOracle Web Services Manager REST API
- ユース・ケース
- トークン発行者の信頼ドキュメントの管理
トークン発行者の信頼ドキュメントの管理
REST APIを使用して、トークン発行者の信頼を参照および管理できます。
cURLコマンドの例では、URL構造を使用しています:
http(s)://host:port/wsm-pmrest/v2/trust
次の方法を使用事例で示します。
-
新しいトークン発行者の信頼ドキュメントの作成
-
トークン発行者の信頼ドキュメントの変更
-
トークン発行者の信頼ドキュメントの表示
-
トークン発行者の信頼ドキュメントの削除
トークン発行者の信頼ドキュメントを管理するには:
- cURLコマンド・ラインでヘッダーを指定します。
-H Accept:application/json
- 次のコマンドを実行して、信頼ドキュメント
myTrustDocument
を作成します:curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust
例
curl -i -X POST -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust
「Trustの作成」を参照してください。
次に、リクエスト本文の例を示します。
[ { "trustname": "myTrustDocument" } ]
次にリクエストの成功を示すレスポンスの例を示します。
{ "STATUSCODE": "20051", "MESSAGE": "Trusts \"[myTrustDocument]\" are successfully created." }
- 次のコマンドを実行して、信頼できる発行者ドキュメント
myTrustDocument
を変更して、表示名TrustDocument
を追加します:curl -i -X PATCH -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust
例
curl -i -X PATCH -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust
「Trustの更新」を参照してください。
次に、リクエスト本文の例を示します。
[ { "trustname": "myTrustDocument", "displayname": "TrustDocument" } ]
次にリクエストの成功を示すレスポンスの例を示します。
{ "STATUSCODE": "20052", "MESSAGE": "Trusts \"[myTrustDocument]\" are successfully updated." }
- リポジトリ内のすべての信頼できる発行者ドキュメントの信頼名および表示名を表示します。
curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/?detail={true/false}
例
curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/?detail=true
「すべてのTrustの取得」を参照してください。
次に、問合せパラメータ
?detail=true
を指定した後のレスポンス本文の例を示します:[ { "trustname": "myTrustDocument", "displayname": "TrustDocument" }, { "trustname": "owsm-trust-doc", "displayname": "owsm-trust-doc" }, { "trustname": "tokenIssuertrustWLS_server_domain", "displayname": "wls_owsm_server_domain_trust_document" }, { "trustname": "tokenIssuertrust_test", "displayname": "tokenIssuertrust_test" }, { "trustname": "oracle-default", "displayname": "i18n:oracle.wsm.resources.resdesc.ResourceDescriptionBundle_property-TokenIssuerTrust_displayName" } ]
- 次のコマンドを実行して、リポジトリの信頼できる発行者ドキュメント
myTrustDocument
の構成詳細を表示します:curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{TrustDocName}
例
curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument
「Trustの取得」を参照してください。
次に、レスポンス本文の例を示します:
{ "trustname": "myTrustDocument", "displayname": "TrustDocument" }
- 次のコマンドを実行すると、信頼できる発行者ドキュメント
myTrustDocument
をリポジトリから削除できます:curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustname}
例
curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument
「Trustの削除」および「すべてのTrustの削除」を参照してください。
次にリクエストの成功を示すレスポンスの例を示します。
{ "STATUSCODE": "20054", "MESSAGE": "Following Trust(s) are successfully deleted: [myTrustDocument]" }