Create Definitions
CreateDefinitions creates one-many new Definitions for the specified ConnectorVersion. For simple cases, it’s recommended to create Definitions individually, however this endpoint can be used to create multiple Definitions for cases where one Definition references another.
Definitions with cyclic references can be created in one API call, see the documentation for the
DefinitionCreate
schema for more info.
Authorizations
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
ID is the unique identifier of the Connector.
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
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'sname
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 usingid
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.
Response
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).