REST API - get

vapi metadata privilege service: get

Retrieves privilege information about the service element corresponding to service_id.

Request:

HTTP request

GET https://{server}/rest/com/vmware/vapi/metadata/privilege/service/id:{service_id}

Path Parameters

Name Type Description
Required
service_id string Identifier of the service element.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "operations"[
            {
                "value"{
                    "privileges"[
                        "string",
                        "string"
                    ],
                    "privilege_info"[
                        {
                            "privileges"[
                                "string",
                                "string"
                            ],
                            "property_path""string"
                        },
                        {
                            "privileges"[
                                "string",
                                "string"
                            ],
                            "property_path""string"
                        }
                    ]
                },
                "key""obj-103"
            }
        ]
    }
}

Response Type:

Name Type Description
bold = required
value service_info The vapi.metadata.privilege.service_info instance that corresponds to service_id.
value.operations list Information about all operation elements contained in this service element that contain privilege information. The key in the key/value pairs is the identifier of the operation element and the value in the key/value pairs is the privilege information for the operation element.

For an explanation of containment of privilege information within operation elements, see vapi.metadata.privilege.service.operation.

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.operation. 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.operation.List of {"key": string, "value": operation_info}

value.operations[].key string
value.operations[].value operation_info
value.operations[].value.privileges string[] List of all privileges assigned to the operation element.

value.operations[].value.privilege_info privilege_info[] Privilege information of all the parameter elements of the operation element. For an explanation of containment of privilege information within parameter elements, see vapi.metadata.privilege.privilege_info.

value.operations[].value.privilege_info[].property_path string The property_path points to an entity that is used in the operation element. An entity can either be present in one of the parameter elements or if a parameter is a structure element, it could also be present in one of the field elements.

If the privilege is assigned to an entity used in the parameter, property_path will just contain the name of the parameter field. If the privilege is assigned to an entity in one of the field elements of a parameter element that is a structure element, then property_path will contain a path to the field element starting from the parameter name.

value.operations[].value.privilege_info[].privileges string[] List of privileges assigned to the entity that is being referred by vapi.metadata.privilege.privilege_info.property_path.

Errors:

HTTP Status Code Type Description
404 not_found if the service element associated with service_id does not have any privilege information.