REST API - get

cis data provider metadata schema: get

Information about the resource model schema of the Data Provider. The schema describes all resource models supported by the provider as well as information about the model properties and how they could be queried.

Request:

HTTP request

POST https://{server}/rest/com/vmware/cis/data/provider/metadata/schema?~action=get
No request parameters

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "models"[
            {
                "value"{
                    "properties"[
                        {
                            "value"{
                                "filterable"true,
                                "filterable_by_unset"true,
                                "type""STRING"
                            },
                            "key""string"
                        }
                    ]
                },
                "key""obj-103"
            }
        ]
    }
}

Response Type:

Name Type Description
bold = required
value schema_info The resource model schema of the Data Provider.
value.models list Information about all resource models (e.g. com.acme.PersonModel), that could be queried, i.e. used in a cis.data.provider.resource_model.query_spec instance. For each resource model, the properties (e.g. name, address) whose values could be retrieved or used in a query filter or sort specification are explicitly listed. Cannot be empty.

Represents a map of resource model ID to a structure that holds the information about the model. Cannot be empty.

When clients pass a value of this structure as a parameter, the key in the field key/value pairs must be an identifier for the resource type: com.vmware.vapi.structure. When operations return a value of this structure as a result, the key in the field key/value pairs will be an identifier for the resource type: com.vmware.vapi.structure.List of {"key": string, "value": model_info}

value.models[].key string
value.models[].value model_info
value.models[].value.properties list Information about all properties of the resource model which could be used in a query, i.e. cis.data.provider.resource_model.query_spec instance. If a property of the resource model is not listed here than it cannot be used in a query.

Represents a map of property name to a structure that holds the information about the property. Cannot be empty.

Each property name could be either a single property name, in case of an immediate property of the resource model or a property path, i.e. chain of property names, separated with / symbol to indicate a child property, e.g. parents/father.

Only the first-level (root) property of all property paths supported for retrieval must be listed in the schema. That means, if a schema supports a first level property for retrieval, it also supports (for retrieval) each property path that begins with that property as root. For example, if a schema contains property runtime, then both runtime/powerState and runtime/host are supported for retrieval, even though the schema does not explicitly list these property paths.

In contrast, all property paths that support filtering/sorting must be explicitly enumerated in the schema. For example to allow filtering/sorting on runtime/powerState, the schema must explicitly include runtime/powerState, it is not sufficient to include runtime.

Each property that supports filtering/sorting also supports retrieval, i.e. could also be retrieved, hence the following First-level rule : for every property path which appears in the schema, the first-level (root) property must also be in the schema. For example, if a schema contains property runtime/powerState, it must also contain property runtime.

List of {"key": string, "value": property_info}

value.models[].value.properties[].key string
value.models[].value.properties[].value property_info
value.models[].value.properties[].value.filterable boolean Whether the property can be used for resource model filtering and result set sorting. There cannot be a property that could be used in a filter but not in a sort and vice versa.

If set to false, the property cannot appear in the filtering specification (i.e. cis.data.provider.resource_model.property_predicate.property) or the sorting specification (i.e. cis.data.provider.resource_model.sort_criterion.property) of any query. However, the property can appear among the requested properties for a query (i.e. cis.data.provider.resource_model.query_spec.properties).

Optional. If unset, defaults to false.

value.models[].value.properties[].value.filterable_by_unset boolean Whether an optional, non-filterable property can be used for resource model filtering with operator UNSET.

If a property is marked filterable, i.e. cis.data.provider.metadata.schema.property_info.filterable = true, it can be used with operator UNSET just like with any other operator and this field should not be set. However, if a property is not filterable, e.g. it is a non-leaf property of complex (non-primitve) type, still, it could be applicable to operator UNSET. In that case, this field should be set to true.

Optional. Must be unset if the property is filterable. Otherwise, it may be unset defaulting to false.

value.models[].value.properties[].value.type string The type of the property value. Set only if the property is filterable, i.e. cis.data.provider.metadata.schema.property_info.filterable is true. Otherwise, defaults to null.

Optional. Unset if the property is not filterable.

Errors:

None