Get CLI Command
Retrieves information about a command including information about how to execute that command.
Request
URLURL
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"identity": {
"name": "string",
"path": "string"
}
}
Identifier of the command for which to retreive information.
Authentication
Response
Response BodyResponse Body
Information about the command including information about how to execute that command.
{
"description": "string",
"formatter": "SIMPLE",
"identity": {
"name": "string",
"path": "string"
},
"operation_id": "string",
"options": [
{
"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"
}
],
"structure_id": "string"
}
],
"service_id": "string"
}
The text description displayed to the user in help output.
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.
List of output structure name and output field info.
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.
The Command.FormatterType enumerated type defines supported CLI output formatter types. See Command.Info.formatter.
SIMPLE : Displays command output as it is.
TABLE : Displays command output in table format.
JSON : Displays command output in JSON format.
XML : Displays command output in XML format.
CSV : Displays command output in CSV format.
HTML : Displays command output in HTML format.
Possible values are: SIMPLE , TABLE , JSON , XML , CSV
Errors
com.vmware.vapi.std.errors.not_found : if a command corresponding to identity doesn’t exist.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/com/vmware/vapi/metadata/cli/command?~action=get
x-vmw-doc-operation: get