POST
/
o
/
{organisation_id}
/
connections
/
{connection_id}
/
versions
/
{version}
/
actions
curl --request POST \
  --url https://platform.versori.com/api/connect/v1alpha1/o/{organisation_id}/connections/{connection_id}/versions/{version}/actions \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "http",
  "name": "<string>",
  "summary": "<string>",
  "description": "<string>",
  "method": "GET",
  "path": "<string>",
  "parameters": [
    {
      "name": "<string>",
      "in": "cookie",
      "required": true,
      "type": "string",
      "default": "<any>",
      "completion": {}
    }
  ],
  "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",
  "path": "<string>",
  "parameters": [
    {
      "name": "<string>",
      "in": "cookie",
      "required": true,
      "type": "string",
      "default": "<any>",
      "completion": {}
    }
  ],
  "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

cookie
string
cookierequired

Cookie authentication used by the Versori Platform.

Path Parameters

organisation_id
string
required
connection_id
string
required

ID is the unique identifier of the Connection.

version
string
required

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

Body

application/json
type
enum<string>
required
Available options:
http
name
string
required

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

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 Action to users, however if omitted the actionId can be used to display to users instead.

description
string

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

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
path
string
required

ActionPath is appended to the Connection's base URL to build the full URL to send requests to. It may also contain placeholders to inject dynamic values from the following sources:

  • {{ param.<name> }} - Injects the value of the parameter with the given name.
  • {{ env.<name> }} - Injects the value of the environment variable with the given name.
parameters
object[]
required
requestBody
object

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

responses
object[]
required

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

Response

201 - application/json
id
string
required

ID is the unique identifier of the Action.

errors
object[]

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

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

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

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 Action to users, however if omitted the actionId can be used to display to users instead.

description
string

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

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
path
string

ActionPath is appended to the Connection's base URL to build the full URL to send requests to. It may also contain placeholders to inject dynamic values from the following sources:

  • {{ param.<name> }} - Injects the value of the parameter with the given name.
  • {{ env.<name> }} - Injects the value of the environment variable with the given name.
parameters
object[]
required
requestBody
object

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

responses
object[]
required

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