This API has a deprecated equivalent from v7.0U1.
Get CLI Namespace
Retreives information about a namespace including information about children of that namespace.
Request
URLURL
https://{api_host}/api/vapi/metadata/cli/namespace?action=get
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Request Body
MetadataCliNamespaceGetRequestBody of mimetype application/json
Required
This is a request body class for an operation.
(The request body parameter is missing description)
{
"identity": {
"name": "string",
"path": "string"
}
}
identity
Required
Identifier of the namespace for which to retreive information.
Authentication
This operation uses the following authentication methods.
Response
Response
Response BodyResponse Body
200 OK returns
MetadataCliNamespaceInfo
of type application/json
Information about the namespace including information about child of that namespace.
{
"children": [
{
"name": "string",
"path": "string"
}
],
"description": "string",
"identity": {
"name": "string",
"path": "string"
}
}
array of
MetadataCliNamespaceIdentity
children
Required
The children of this namespace in the tree of CLI namespaces.
string
description
Required
The text description displayed to the user in help output.
Errors
404
com.vmware.vapi.std.errors.not_found : if a namespace corresponding to identity doesn’t exist.
default
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
$MetadataCliNamespaceIdentity = Initialize-MetadataCliNamespaceIdentity -Path "MyPath" -Name "MyName"
$MetadataCliNamespaceGetRequestBody = Initialize-MetadataCliNamespaceGetRequestBody -Identity $MetadataCliNamespaceIdentity
Invoke-GetCliNamespace -MetadataCliNamespaceGetRequestBody $MetadataCliNamespaceGetRequestBody
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"identity":{"name":"string","path":"string"}}' https://{api_host}/api/vapi/metadata/cli/namespace?action=get
Vendor Extensions
This operation contains the following vendor extensions defined in the spec:
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/com/vmware/vapi/metadata/cli/namespace?~action=get
x-vmw-doc-operation: get
Availability
Added in 7.0U2