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

definition_name
string
required

Body

application/json

DefinitionUpdate is the payload used to update an existing Definition.

id
string
required

ID is the unique identifier of the Definition. This must be set for updates.

name
string
required

Name is a unique identifier for the Definition within the scope of the Connector. It is expected to both human and machine-readable, i.e. "Product" or "product_variant".

accept
string[]
required

Accept indicates which content types, expressed as MIME types, that this definition can accept. This value is analogous to the Accept HTTP header, as defined in RFC 7231, section 5.3.2, except each type is defined in a separate array element, rather than as a comma-separated list.

This does not represent the content type of the schema body itself, but the data which conforms to this definition. For example, an API may respond in JSON or YAML, but the schema may be a YAML-formatted JSON Schema. In this case, the Definition's accept field could be ["application/json", "text/yaml"] and schema.contentType will be application/schema+yaml.

description
string

Description is a human-friendly description of the Definition. This is typically used to describe the purpose of the Definition and how it should be used.

schema
object

InlineSchema is a Schema which is defined inline within the Definition. This is typically used when creating or updating a Definition and the actual schema payload is sent with the request. For retrieval operations, the Definition will contain a URL which resolves to the Schema.

Response

200
application/json
OK

Definition describes a single definition of a type which is used by the Connector. The schema language used is dependent on the media-type of the Definition, for example JSON Schema is used for media-types application/json.

id
string
required

ID is the unique identifier of the Definition.

name
string
required

Name is a unique identifier for the Definition within the scope of the Connector. It is expected to both human and machine-readable, i.e. "Product" or "product_variant".

accept
string[]
required

Accept indicates which content types, expressed as MIME types, that this definition can accept. This value is analogous to the Accept HTTP header, as defined in RFC 7231, section 5.3.2, except each type is defined in a separate array element, rather than as a comma-separated list.

This does not represent the content type of the schema body itself, but the data which conforms to this definition. For example, an API may respond in JSON or YAML, but the schema may be a YAML-formatted JSON Schema. In this case, the Definition's accept field could be ["application/json", "text/yaml"] and schema.contentType will be application/schema+yaml.

url
string
required

URL is the location of the actual Schema definition for this Definition entity.

The structure of this URL will be consistent across all media types for each connection, for example:

  • https://platform.versori.com/api/schemas/v1/o/{organisation_id}/{connector_id}/{connector_version}/{definition_slug}.{media_type_ext}
description
string

Description is a human-friendly description of the Definition. This is typically used to describe the purpose of the Definition and how it should be used.

referencedBy
object[]

ReferencedBy is a list of DefinitionReference objects which defines what other entities are referencing the this Definition.