Integrations
Manage third-party integrations including Slack, Jira, and GitHub App.
Slack Integration
Base path: /api/auth (Slack settings are under auth routes)
Authentication: Bearer token required
Get Slack Settings
GET /api/auth/slack
Get the current Slack webhook configuration.
Response
{
"success": true,
"data": {
"enabled": true,
"webhookUrl": "https://hooks.slack.com/services/T****/B****/****",
"channel": "#infra-alerts",
"events": ["scan_completed", "drift_detected", "drift_resolved"]
}
}Example
curl -H "Authorization: Bearer TOKEN" \
https://api.controlinfra.com/api/auth/slackUpdate Slack Settings
PUT /api/auth/slack
Update Slack webhook configuration.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
webhookUrl | string | Yes | Slack webhook URL |
channel | string | No | Channel name (for display) |
events | string[] | No | Events to notify on |
Test Slack Webhook
POST /api/auth/slack/test
Send a test message to the configured Slack webhook.
Example
curl -X POST -H "Authorization: Bearer TOKEN" \
https://api.controlinfra.com/api/auth/slack/testDelete Slack Integration
DELETE /api/auth/slack
Remove the Slack webhook configuration.
Jira Integration
Base path: /api/jira
Authentication: Bearer token required (except OAuth callback)
Initiate OAuth
GET /api/jira/oauth/initiate
Authentication: Bearer token required
Start the Jira OAuth flow. Returns the Atlassian authorization URL.
Response
{
"success": true,
"data": {
"authorizationUrl": "https://auth.atlassian.com/authorize?..."
}
}OAuth Callback
GET /api/jira/oauth/callback
Authentication: None (public)
Handles the Atlassian OAuth callback. Validates state and stores tokens.
Get Jira Config
GET /api/jira/config
Get the current Jira integration configuration.
Response
{
"success": true,
"data": {
"connected": true,
"siteUrl": "https://mycompany.atlassian.net",
"defaultProject": "INFRA",
"defaultIssueType": "Bug"
}
}Save Jira Config
POST /api/jira/config
Save or update Jira configuration settings (project defaults, issue type, etc.).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
defaultProject | string | No | Default Jira project key |
defaultIssueType | string | No | Default issue type |
Test Connection
POST /api/jira/test-connection
Test the Jira connection using stored OAuth tokens.
Get Jira Projects
GET /api/jira/projects
List available Jira projects.
Get Issue Types
GET /api/jira/projects/:projectKey/issue-types
Get issue types for a specific Jira project.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
projectKey | string | Jira project key (e.g., INFRA) |
Get Priorities
GET /api/jira/priorities
Get available Jira priorities.
Create Ticket from Widget
POST /api/jira/widgets/:widgetId/create-ticket
Create a Jira ticket from a drift widget.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
widgetId | string | Drift widget ID |
Verify Widget Ticket
GET /api/jira/widgets/:widgetId/verify-ticket
Verify that a linked Jira ticket still exists.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
widgetId | string | Drift widget ID |
Disconnect Jira
DELETE /api/jira/disconnect
Disconnect the Jira integration and remove stored OAuth credentials.
GitHub App
GitHub App management is handled under the Authentication endpoints:
GET /api/auth/github-app/install— Get install URLGET /api/auth/github-app/callback— Installation callbackGET /api/auth/github-app/installations— List installationsPOST /api/auth/github-app/set-active— Set active installationPOST /api/auth/github-app/sync-repos— Sync repositoriesDELETE /api/auth/github-app/installations/:installationId— Uninstall