DRAGOPS
DRAGOPS
DocumentationAPI referenceConnections

Connections

Manage OAuth connections and API key credentials for external service integrations through the DRAGOPS API.

Connections store credentials for external services that your patterns use. When a pattern makes an HTTP request to a service like GitHub, Slack, or a cloud provider, it uses a connection to authenticate. Credentials are encrypted at rest and never exposed in plain text after creation.

Authentication required for all endpoints.

List connections

GET /api/connections

Return all connections belonging to the authenticated user.

Response

{
  "connections": [
    {
      "id": "conn_abc123",
      "provider": "github",
      "displayName": "GitHub - Production",
      "type": "oauth",
      "status": "active",
      "createdAt": "2026-02-15T10:00:00.000Z",
      "updatedAt": "2026-02-15T10:00:00.000Z"
    },
    {
      "id": "conn_def456",
      "provider": "slack",
      "displayName": "Slack - Engineering",
      "type": "api_key",
      "status": "active",
      "createdAt": "2026-02-20T14:00:00.000Z",
      "updatedAt": "2026-02-20T14:00:00.000Z"
    }
  ]
}

Get connection

GET /api/connections/:id

Return details for a single connection. Credential values (API keys, tokens) are not included in the response.

Path parameters

ParameterTypeRequiredDescription
idstringYesConnection ID

Response

{
  "id": "conn_abc123",
  "provider": "github",
  "displayName": "GitHub - Production",
  "type": "oauth",
  "status": "active",
  "scopes": ["repo", "read:org"],
  "createdAt": "2026-02-15T10:00:00.000Z",
  "updatedAt": "2026-02-15T10:00:00.000Z"
}

Create API key connection

POST /api/connections/api-key

Create a new connection using an API key. The API key is encrypted before storage. When a workspace is active, the key is automatically seeded as a secret to all workspace environments.

Request body

ParameterTypeRequiredDescription
providerstringYesService provider name (e.g., slack, sendgrid, openai)
apiKeystringYesThe API key or token
displayNamestringNoHuman-readable label for the connection
environmentIdstringNoTarget environment ID
{
  "provider": "slack",
  "apiKey": "xoxb-1234567890-abcdefghijklmnop",
  "displayName": "Slack - Engineering"
}

Response

{
  "id": "conn_ghi789",
  "provider": "slack",
  "displayName": "Slack - Engineering",
  "type": "api_key",
  "status": "active",
  "createdAt": "2026-03-05T12:00:00.000Z",
  "seedResult": {
    "secretsSeeded": 2,
    "secretNames": ["SLACK_API_KEY", "SLACK_BOT_TOKEN"]
  }
}

The seedResult field shows how many environment secrets were automatically created from the connection.

Errors

CodeStatusDescription
400provider and apiKey are required

Create multi-field credential connection

POST /api/connections/credentials

Create a connection with multiple credential fields. Use this endpoint for services that require more than a single API key — for example, a username, API token, and base URL.

Request body

ParameterTypeRequiredDescription
providerstringYesService provider name (e.g., jira, servicenow)
credentialsobjectYesKey-value pairs of credential field names and values
displayNamestringNoHuman-readable label for the connection
environmentIdstringNoTarget environment ID
{
  "provider": "jira",
  "credentials": {
    "user-email": "[email protected]",
    "api-token": "your-api-token",
    "base-url": "https://mycompany.atlassian.net"
  },
  "displayName": "Jira - Production"
}

Response

{
  "id": "conn_xyz789",
  "provider": "jira",
  "displayName": "Jira - Production",
  "type": "credentials",
  "status": "active",
  "createdAt": "2026-03-09T12:00:00.000Z",
  "seedResult": {
    "secretsSeeded": 3,
    "secretNames": ["JIRA_USER_EMAIL", "JIRA_API_TOKEN", "JIRA_BASE_URL"]
  }
}

The seedResult field shows how many environment secrets were automatically created from the connection's credential fields.

Errors

CodeStatusDescription
400provider and credentials (non-empty object) are required

Delete connection

DELETE /api/connections/:id

Delete a connection and its stored credentials. Patterns that reference this connection will fail on their next execution until a replacement connection is configured.

Path parameters

ParameterTypeRequiredDescription
idstringYesConnection ID

Response

204 No Content

On this page