REST API - create

vapi metadata routing source: create

Create a new metadata source.

Request:

HTTP request

POST https://{server}/rest/com/vmware/vapi/metadata/routing/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"
    }
}

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 of type is REMOTE.

Response:

HTTP Status Code: 200

None

Errors:

HTTP Status Code Type Description
400 already_exists If the metadata source identifier is already present.
400 invalid_argument If type of the source specified in @{link CreateSpec#type} is invalid.
404 not_found If the file specified in @{link CreateSpec#filepath} does not exist.