Skip to content

OAuth connections that the vault mints, and the injection rules that use them

Resource, request and plan limits are listed on Limits.

Download OpenAPI specification · Version 0.1.0

List connections

GET
/connections

Returns every OAuth connection of the organization with its provider, account and refresh state; the tokens stay in the vault and never appear in an answer. An injection rule names a connection as connection:<id>.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Response Body

Every connection of the organization, newest first; [] when there are none.

application/json
  1. response

Every connection of the organization, newest first; [] when there are none.

[index: integer]?

One connection of the organization, which holds no token.

Example Request
curl -X GET 'https://api.slashinfra.com/connections'
Example Response
[  {    "account": "ada",    "created_ms": 1767225600000,    "id": "conn_6f1c0f0e8a",    "provider": "github",    "status": "active"  }]

Start a connection

POST
/connections

Starts a connection flow for one provider: OAuth2 gets an authorize URL built with PKCE, and the GitHub App gets its install URL. The provider sends the person back to GET /connections/callback, which stores the connection.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Request Body

The provider to connect.

  1. body

The provider to connect.

provider*string

The provider id of the registry, such as github; a provider whose kind is not enabled answers 400 provider_unavailable.

Response Body

The authorize URL of the provider; the connection exists only after its callback.

application/json
  1. response

The authorize URL of the provider; the connection exists only after its callback.

authorize_url*string

The URL to send the person to; its signed state names the organization, the provider, a ten-minute expiry and a single-use nonce.

id*string

The id that the connection gets when the flow finishes: GET /connections/:id answers 404 connection_not_found until then, so a client polls it to learn when the person approved.

Example Request
curl -X POST 'https://api.slashinfra.com/connections' \  -H 'Content-Type: application/json' \  -d '{  "provider": "github"}'
Example Response
{  "authorize_url": "https://github.com/login/oauth/authorize?response_type=code&client_id=...&state=...",  "id": "conn_6f1c0f0e8a"}

Delete a connection

DELETE
/connections/{id}

Deletes the connection and its tokens; an active SVM whose rules reference connection:<id> answers 409 connection_in_use, so remove those rules first. Profiles do not block the delete.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

id*string

The connection id, conn_ and ten id symbols.

Length1 <= length

Response Body

The connection and its tokens are deleted, with no body.

response?stringtext/plain

The connection and its tokens are deleted, with no body.

Example Request
curl -X DELETE 'https://api.slashinfra.com/connections/conn_6f1c0f0e8a'
Example Response
"string"

Get a connection

GET
/connections/{id}

Returns one connection and the rules that attach it to an SVM: the provider's inject list, expanded with secret_id = connection:<id>. Submit those rules in POST /svms or a profile.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

id*string

The connection id, conn_ and ten id symbols.

Length1 <= length

Response Body

One connection with the rules that attach it to an SVM: the preset expansion of its provider.

application/json
  1. response

One connection with the rules that attach it to an SVM: the preset expansion of its provider.

account*string

The account at the provider, for display.

created_ms*integer

The creation time in milliseconds since the Unix epoch.

env*

The environment that the rules need: GH_TOKEN=injected for GitHub, so gh sends a header for the vault to replace.

id*string

The connection id: conn_ and ten symbols of the SVM id alphabet.

provider*string

The provider id of the vault registry.

secret_id*string

The reference that an injection rule names: connection:<id>.

secret_injections*array<>

The expanded inject rules of the provider, with secret_id set to this connection: submit them in a create or a profile.

status*string

active after the callback, or error after a refresh failed; a token that is still valid keeps working.

Value in"active""error"
Example Request
curl -X GET 'https://api.slashinfra.com/connections/conn_6f1c0f0e8a'
Example Response
{  "account": "ada",  "created_ms": 1767225600000,  "env": {    "GH_TOKEN": "injected"  },  "id": "conn_6f1c0f0e8a",  "provider": "github",  "secret_id": "connection:conn_6f1c0f0e8a",  "secret_injections": [    {      "domain": "api.openai.com",      "header": "authorization",      "placeholder": "__TELEGRAM_BOT_TOKEN__",      "secret_id": "sec_6f1c0f0e8a",      "value_format": "raw",      "value_prefix": "Bearer "    }  ],  "status": "active"}