com.vmware.vapi.metadata.metamodel.resource.model

The model service provides operations to retrieve information about models.

A structure is used as a model if it is used for persisting data about an entity. Some of the fields in the model structure are also used for creating indexes for querying.

One or more services can operate on the same resource type. One or more services can provide the model structure for an entity of this resource type. Using model service you can retrieve the list of all the structure elements that are model structures for a given resource type.

list

GET /com/vmware/vapi/metadata/metamodel/resource/model
POST /com/vmware/vapi/metadata/metamodel/resource/model/id:{resource_id}?~action=list
POST /com/vmware/vapi/metadata/metamodel/resource/model?~action=list

Returns the set of identifiers for the structure elements that are models for the resource type corresponding to resource_id.

The com.vmware.vapi.metadata.metamodel.structure service provides operations to retrieve more details about the structure elements corresponding to the identifiers returned by this operation.

Request:
Representations:
{
    "resource_id""obj-103"
}
<?xml version="1.0" ?>
<ns0:List-Input xmlns:ns0="http://vmware.com/vapi/metadata/metamodel/resource/model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <resource_id>obj-103</resource_id>
</ns0:List-Input>
GET /com/vmware/vapi/metadata/metamodel/resource/model
?resource_id=obj-103

Parameters:
Name Type Required Description
resource_id
 *
ID Yes Identifier of the resource type. Id of type com.vmware.vapi.resource.

Response:
Representations:
{
    "value"[
        "obj-103",
        "obj-103"
    ]
}
<?xml version="1.0" ?>
<ns0:List-Result xmlns:ns0="http://vmware.com/vapi/metadata/metamodel/resource/model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value-array>
    <array-item>obj-103</array-item>
    <array-item>obj-103</array-item>
  </value-array>
</ns0:List-Result>

Parameters:
Name Type Required Description
result Set<ID> Yes The set of identifiers for the models that are associated with the resource type in resource_id. Id of type com.vmware.vapi.structure.

Errors:
Type Description HTTP Status Code
not_found if the resource type associated with resource_id does not exist. 404

Copyright © 2014. All Rights Reserved.