vapi metadata cli command: get

Retrieves information about a command including information about how to execute that command.

Request:

HTTP request

POST https://{server}/rest/com/vmware/vapi/metadata/cli/command?~action=get

Request Body Structure:

{
    "identity"{
        "name""string",
        "path""string"
    }
}
<?xml version="1.0" ?>
<ns0:Get-Input xmlns:ns0="http://vmware.com/vapi/metadata/cli/command" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <identity>
    <name>string</name>
    <path>string</path>
  </identity>
</ns0:Get-Input>

Request Body Parameters:

Name Type Description
bold = required
identity identity Identifier of the command for which to retreive information.
identity.path string The dot-separated path of the namespace containing the command in the CLI command tree.

identity.name string Name of the command.

Response:

HTTP Status Code: 200

Representations:

{
    "value"{
        "description""string",
        "formatter""SIMPLE",
        "identity"{
            "name""string",
            "path""string"
        },
        "operation_id""obj-103",
        "options"[
            {
                "description""string",
                "field_name""string",
                "generic""NONE",
                "long_option""string",
                "short_option""string",
                "type""string"
            },
            {
                "description""string",
                "field_name""string",
                "generic""NONE",
                "long_option""string",
                "short_option""string",
                "type""string"
            }
        ],
        "output_field_list"[
            {
                "output_fields"[
                    {
                        "display_name""string",
                        "field_name""string"
                    },
                    {
                        "display_name""string",
                        "field_name""string"
                    }
                ],
                "structure_id""obj-103"
            },
            {
                "output_fields"[
                    {
                        "display_name""string",
                        "field_name""string"
                    },
                    {
                        "display_name""string",
                        "field_name""string"
                    }
                ],
                "structure_id""obj-103"
            }
        ],
        "service_id""obj-103"
    }
}
<?xml version="1.0" ?>
<ns0:Get-Result xmlns:ns0="http://vmware.com/vapi/metadata/cli/command" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>
    <formatter>SIMPLE</formatter>
    <service_id>obj-103</service_id>
    <operation_id>obj-103</operation_id>
    <identity>
      <name>string</name>
      <path>string</path>
    </identity>
    <output_field_list-array>
      <array-item>
        <output_fields-array>
          <array-item>
            <field_name>string</field_name>
            <display_name>string</display_name>
          </array-item>
          <array-item>
            <field_name>string</field_name>
            <display_name>string</display_name>
          </array-item>
        </output_fields-array>
        <structure_id>obj-103</structure_id>
      </array-item>
      <array-item>
        <output_fields-array>
          <array-item>
            <field_name>string</field_name>
            <display_name>string</display_name>
          </array-item>
          <array-item>
            <field_name>string</field_name>
            <display_name>string</display_name>
          </array-item>
        </output_fields-array>
        <structure_id>obj-103</structure_id>
      </array-item>
    </output_field_list-array>
    <description>string</description>
    <options-array>
      <array-item>
        <generic>NONE</generic>
        <field_name>string</field_name>
        <description>string</description>
        <type>string</type>
        <long_option>string</long_option>
        <short_option>string</short_option>
      </array-item>
      <array-item>
        <generic>NONE</generic>
        <field_name>string</field_name>
        <description>string</description>
        <type>string</type>
        <long_option>string</long_option>
        <short_option>string</short_option>
      </array-item>
    </options-array>
  </value>
</ns0:Get-Result>

Response Type:

Name Type Description
bold = required
value info Information about the command including information about how to execute that command.
value.identity identity Basic command identity.

value.identity.path string The dot-separated path of the namespace containing the command in the CLI command tree.

value.identity.name string Name of the command.

value.description string The text description displayed to the user in help output.

value.service_id string The service identifier that contains the operations for this CLI command.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vapi.service. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vapi.service.

value.operation_id string The operation identifier corresponding to this CLI command.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vapi.operation. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vapi.operation.

value.options option_info[] The input for this command.

value.options[].long_option string The long option name of the parameter as used by the user.

value.options[].short_option string The single character value option name.

Optional. If not present, there's no single character option for the parameter.

value.options[].field_name string The fully qualified name of the option referred to by the operation element in vapi.metadata.cli.command.info.operation_id.

value.options[].description string The description of the option to be displayed to the user when they request usage information for a CLI command.

value.options[].type string The type of option. This is used to display information about what kind of data is expected (string, number, boolean, etc.) for the option when they request usage information for a CLI command. For enumerated type this stores the fully qualified enumerated type id.

value.options[].generic string This is used to tell the user whether the option is required or optional, or whether they can specify the option multiple times.

Defines generic types supported by command service. See vapi.metadata.cli.command.option_info.generic. Value is one of:
NONE: Default case.
OPTIONAL: Input parameter is an optional.
LIST: Input parameter is a list.
OPTIONAL_LIST: Input parameter is an optional of type list.

New in vSphere 6.5.


LIST_OPTIONAL: Input parameter is a list of optionals.

New in vSphere 6.5.

value.formatter string The formatter to use when displaying the output of this command.

Optional. If not present, client can choose a default output formatter.

value.output_field_list output_info[] List of output structure name and output field info.

value.output_field_list[].structure_id string Name of the structure.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vapi.structure. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vapi.structure.

value.output_field_list[].output_fields output_field_info[] The order in which the fields of the structure will be displayed by the CLI as well as the names used to display the fields.

value.output_field_list[].output_fields[].field_name string Name of the field.

value.output_field_list[].output_fields[].display_name string Name used by the CLI to display the field.

Errors:

HTTP Status Code Type Description
404 not_found if a command corresponding to identity doesn't exist.