vapi metadata privilege source: create
Creates a new metadata source. Once the server validates the registration information of the metadata source, the privilege metadata is retrieved from the source. This populates elements in all the services defined in vapi.metadata.privilege API.
Request:
HTTP request
POST https://{server}/rest/com/vmware/vapi/metadata/privilege/source/id:{source_id}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
source_id | string | metadata source identifier. |
Request Body Structure:
{
"spec" : {
"address" : "http://myurl.com",
"filepath" : "string",
"description" : "string",
"type" : "FILE"
}
}
"spec" : {
"address" : "http://myurl.com",
"filepath" : "string",
"description" : "string",
"type" : "FILE"
}
}
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
spec | create_spec | create specification. |
spec.description | string | English language human readable description of the source. |
spec.type | string | Type of the metadata source. Defines the types of sources for API metadata. You specify the type of source when adding a metadata source to a metadata service. Value is one of: FILE: Indicates the metadata source is a JSON file. REMOTE: Indicates the metadata source is a remote server. |
spec.filepath | string | Absolute file path of the metamodel metadata file that has the metamodel information about one component element. Optional. It is only relevant when type has value FILE. This field is optional and it is only relevant when the value of type is FILE. |
spec.address | URI | Connection information of the remote server. This should be of the format http(s)://IP:port/namespace. The remote server should contain the services in vapi.metadata.metamodel API. It could expose metamodel information of one or more components. Optional. It is only relevant when type has value REMOTE. This field is optional and it is only relevant when the value oftype is REMOTE. |
Response:
HTTP Status Code: 200
NoneErrors:
HTTP Status Code | Type | Description |
---|---|---|
400 | already_exists | if the metadata source identifier is already registered with the infrastructure. |
400 | invalid_argument | if the type of the source specified in CreateSpec#type is invalid. |
404 | not_found | if the file specified in CreateSpec#filepath does not exist. |