2.4. Listing the IdM API commands and parameters
You can list information about the IdM API command and its parameters by using the commands command_show and param_show.
Prerequisites
- The IdM API is initialized. For more information, see Initializing IdM API.
Procedure
To display information about
user_addcommand, execute the following code:api.Command.command_show("user_add")The result for this command is as follows:
{ "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, }To display information about the
givennameparameter for theuser_addcommand, execute the following code:api.Command.param_show("user_add", name="givenname")The result for this command is as follows:
{ "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, }