XPipe LogoXPipe Documentation

Add new connection

Creates the new connection in the xpipe vault from raw json data. This can also perform an optional validation first to make sure that the connection can be established. If an equivalent connection already exists, no new one will be added.

POST
/connection/add

Authorization

AuthorizationRequiredBearer <token>

The bearer token used is the session token that you receive from the handshake exchange.

In: header

Request Body

application/jsonRequired
nameRequiredstring

The connection name

dataRequiredobject

The raw connection store data. Schemas for connection types are not documented, but you can find the connection data of your existing connections in the xpipe vault.

validateRequiredboolean

Whether to perform a connection validation before adding it, i.e., probe the connection first. If validation is enabled and fails, the connection will not be added

categorystring

The category uuid to put the connection in. If not specified, the default category will be used

curl -X POST "http://localhost:21721/connection/add" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my connection",
    "validate": true,
    "category": "97458c07-75c0-4f9d-a06e-92d8cdf67c40",
    "data": {
      "type": "shellEnvironment",
      "commands": null,
      "host": {
        "storeId": "f0ec68aa-63f5-405c-b178-9a4454556d6b"
      },
      "shell": "pwsh",
      "elevated": false
    }
  }'

The request was successful. The connection was added.

{
  "summary": "Connection information",
  "value": {
    "connection": "36ad9716-a209-4f7f-9814-078d3349280c"
  }
}