POST
/
o
/
{organisation_id}
/
connectors
/
{connector_id}
/
versions
/
{version}
/
definitions
curl --request POST \
  --url https://platform.versori.com/api/connect/v1/o/{organisation_id}/connectors/{connector_id}/versions/{version}/definitions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "definitions": [
    {
      "name": "<string>",
      "accept": [
        "<string>"
      ],
      "description": "<string>",
      "schema": {
        "contentType": "application/schema+json",
        "content": "<string>"
      }
    }
  ]
}'
{
  "definitions": [
    {
      "id": "<string>",
      "name": "<string>",
      "accept": [
        "<string>"
      ],
      "description": "<string>",
      "url": "<string>",
      "referencedBy": [
        {
          "type": "definition",
          "id": "<string>",
          "name": "<string>"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication used by the Versori Platform. External consumers must provide an API key, however internal consumers must provide a JWT id_token issued by our IdP.

Path Parameters

organisation_id
string
required
connector_id
string
required

ID is the unique identifier of the Connector.

version
string
required

Version is the version name of the Connector to retrieve. The reserved names "latest" and "default" may be used to retrieve the latest version or the default version respectively.

Body

application/json

DefinitionsCreate is the payload used to create new Definitions. Each definition can reference another definition in the same request using the following syntax:

{
  "$ref": "#/$defs/{definition_name}"
}

New definitions may also reference existing definitions, however they use the proper URL syntax:

{
  "$ref": "https://platform.versori.com/api/schemas/v1/o/{organisation_id}/{connector_id}/{connector_version}/{definition_id}.{media_type_ext}"
}

Note, the $refs stored in GCS are the gs:// URLs. The API must transform the URLs to the correct public URL. Ideally, the Definition's name would be in the URL, but this would cause issues if a user wanted to rename a Definition, which is something I think we should support. For now using id is fine, but if we changed to in the future, we'd need a way to iterate over all Definitions referencing the one being renamed and update the $ref URLs.

For referencing existing definitions, the definition name must already exist within the scope of the current Connector and Version.

Each definition must have matching dataMediaTypes and schema.mediaType values.

definitions
object[]
required

Response

201
application/json
Created

Definitions is a list of Definition objects. This is a non-paginated list and contains all definitions related to the originating request (i.e. all created Definitions in a CreateDefinitions request).

definitions
object[]
required