POST
/
o
/
{organisation_id}
/
connectors
/
{connector_id}
/
versions
/
{version}
/
triggers
curl --request POST \
  --url https://platform.versori.com/api/connect/v1/o/{organisation_id}/connectors/{connector_id}/versions/{version}/triggers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "http",
  "name": "<string>",
  "summary": "<string>",
  "description": "<string>",
  "method": "GET",
  "parameters": [
    {
      "name": "<string>",
      "in": "cookie",
      "required": true,
      "type": "string",
      "default": "<any>"
    }
  ],
  "requestBody": {
    "required": true,
    "definitions": [
      {
        "definition": {
          "id": "<string>"
        }
      }
    ]
  },
  "responses": [
    {
      "status": 123,
      "definitions": [
        {
          "definition": {
            "id": "<string>"
          }
        }
      ]
    }
  ]
}'
{
  "id": "<string>",
  "errors": [
    {
      "field": "<string>",
      "message": "<string>",
      "severity": "error"
    }
  ],
  "type": "http",
  "name": "<string>",
  "summary": "<string>",
  "description": "<string>",
  "method": "GET",
  "parameters": [
    {
      "name": "<string>",
      "in": "cookie",
      "required": true,
      "type": "string",
      "default": "<any>"
    }
  ],
  "requestBody": {
    "required": true,
    "definitions": [
      {
        "id": "<string>",
        "definition": {
          "id": "<string>",
          "name": "<string>",
          "accept": [
            "<string>"
          ],
          "description": "<string>",
          "url": "<string>",
          "referencedBy": [
            {
              "type": "definition",
              "id": "<string>",
              "name": "<string>"
            }
          ]
        }
      }
    ]
  },
  "responses": [
    {
      "status": 123,
      "id": "<string>",
      "definitions": [
        {
          "id": "<string>",
          "definition": {
            "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

TriggerCreate defines a new Trigger to be created.

type
enum<string>
required
Available options:
http
name
string
required

Name is a unique identifier for the Trigger within the scope of the Connector. It is expected to both human and machine-readable, i.e. "GetProduct" or "get_products", see the validation regex for more details.

method
enum<string>
required

HTTPMethod defines the HTTP method which will be used when invoking the Action. This is typically one of the standard HTTP methods such as GET, POST, PUT, PATCH or DELETE, but may be any valid HTTP method.

Available options:
GET,
POST,
PUT,
PATCH,
DELETE,
HEAD,
OPTIONS,
CONNECT,
TRACE
parameters
object[]
required

TriggerHTTPParameter defines a parameter which is sent to the HTTP endpoint when invoking the Trigger. This may be a query parameter, header or cookie depending on the in field.

responses
object[]
required

Responses defines the expected responses from the HTTP endpoint. This is used to determine whether the Trigger was successful or not. At least one response must be defined in order for the Trigger to be valid.

TriggerHTTPResponseCreate is the payload to create a new response for a Trigger.

summary
string

Summary is a human-readable version of the id field, i.e. "Get Product" or "Get Products". This is used when displaying the Trigger to users, however if omitted the TriggerId can be used to display to users instead.

description
string

Description is a human-readable description of the Trigger. It can provide extra information to users about how the Trigger operates and anything the user may need to be aware of when using it.

requestBody
object

TriggerHTTPRequestBody defines whether a request body is required for a particular HTTP Trigger, and if so which Definitions are considered valid. If this value is undefined then no request body will be sent.

Response

201
application/json
Created

TriggerHTTPCommon defines the common fields for all HTTP Triggers.

type
enum<string>
required
Available options:
http
name
string
required

Name is a unique identifier for the Trigger within the scope of the Connector. It is expected to both human and machine-readable, i.e. "GetProduct" or "get_products", see the validation regex for more details.

id
string
required

ID is the unique identifier of the Trigger.

method
enum<string>
required

HTTPMethod defines the HTTP method which will be used when invoking the Action. This is typically one of the standard HTTP methods such as GET, POST, PUT, PATCH or DELETE, but may be any valid HTTP method.

Available options:
GET,
POST,
PUT,
PATCH,
DELETE,
HEAD,
OPTIONS,
CONNECT,
TRACE
parameters
object[]
required

TriggerHTTPParameter defines a parameter which is sent to the HTTP endpoint when invoking the Trigger. This may be a query parameter, header or cookie depending on the in field.

responses
object[]
required

Responses defines the expected responses from the HTTP endpoint. This is used to determine whether the Trigger was successful or not.

TriggerHTTPResponse defines what responses may be returned by the HTTP server when invoking the Trigger.

summary
string

Summary is a human-readable version of the id field, i.e. "Get Product" or "Get Products". This is used when displaying the Trigger to users, however if omitted the TriggerId can be used to display to users instead.

description
string

Description is a human-readable description of the Trigger. It can provide extra information to users about how the Trigger operates and anything the user may need to be aware of when using it.

errors
object[]

Errors is a list of ErrorField objects which defines the errors which may be returned by the Trigger. An empty array denotes that the Trigger has been validated and no errors were found. If this field is undefined then this means validation has not occurred.

TriggerError is the payload returned when a Trigger fails validation

requestBody
object

TriggerHTTPRequestBody defines whether a request body is required for a particular HTTP Trigger, and if so which Definitions are considered valid. If this value is undefined then no request body will be sent.