vapi metadata cli source: create
Creates a new metadata source. Once the server validates the registration information of the metadata source, the CLI metadata is retrieved from the source. This populates elements in all the services defined in vapi.metadata.cli API.
Request:
HTTP request
POST https://{server}/rest/com/vmware/vapi/metadata/cli/source/id:{source_id}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
source_id | string | metadata source identifier. |
Request Body Structure:
{
"spec": {
"address": "http://myurl.com",
"description": "string",
"filepath": "string",
"type": "FILE"
}
}
"spec": {
"address": "http://myurl.com",
"description": "string",
"filepath": "string",
"type": "FILE"
}
}
<?xml version="1.0" ?>
<ns0:Create-Input xmlns:ns0="http://vmware.com/vapi/metadata/cli/source" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spec>
<filepath>string</filepath>
<address>http://myurl.com</address>
<description>string</description>
<type>FILE</type>
</spec>
</ns0:Create-Input>
<ns0:Create-Input xmlns:ns0="http://vmware.com/vapi/metadata/cli/source" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<spec>
<filepath>string</filepath>
<address>http://myurl.com</address>
<description>string</description>
<type>FILE</type>
</spec>
</ns0:Create-Input>
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 type of the source specified in CreateSpec#type is invalid. |
404 | not_found | If the file specified in CreateSpec#filepath does not exist. |