2.4. IdM API コマンドとパラメーターのリスト
コマンド command_show および param_show を使用すると、IdM API コマンドとそのパラメーターに関する情報をリスト表示できます。
前提条件
- IdM API が初期化されている。詳細は、IdM API の初期化 を参照してください。
手順
user_addコマンドに関する情報を表示するには、次のコードを実行します。api.Command.command_show("user_add")このコマンドの結果は次のようになります。
{ "result": { "name": "user_add", "version": "1", "full_name": "user_add/1", "doc": "Add a new user.", "topic_topic": "user/1", "obj_class": "user/1", "attr_name": "add", }, "value": "user_add", "messages": [ { "type": "warning", "name": "VersionMissing", "message": "API Version number was not sent, forward compatibility not guaranteed. Assuming server's API version, 2.251", "code": 13001, "data": {"server_version": "2.251"}, } ], "summary": None, }user_addコマンドのgivennameパラメーターに関する情報を表示するには、次のコードを実行します。api.Command.param_show("user_add", name="givenname")このコマンドの結果は次のようになります。
{ "result": { "name": "givenname", "type": "str", "positional": False, "cli_name": "first", "label": "First name", }, "value": "givenname", "messages": [ { "type": "warning", "name": "VersionMissing", "message": "API Version number was not sent, forward compatibility not guaranteed. Assuming server's API version, 2.251", "code": 13001, "data": {"server_version": "2.251"}, } ], "summary": None, }