Authentication
All integration endpoints require authentication and specific permissions:integration.view- View integrationsintegration.create- Create integrationsintegration.edit- Update integrationsintegration.delete- Delete integrationsintegration.sync- Trigger manual synchronization
Authentication Types
Integrations support multiple authentication methods:- basic_auth - Username and password authentication
- api_token - API token or key-based authentication
- oauth2 - OAuth 2.0 authentication flow
Integration Object
Unique identifier for the integration (UUID)
Name of the external service (e.g., “ServiceNow”, “Jira”)
Authentication type:
basic_auth, api_token, or oauth2Integration-specific configuration. Sensitive fields (passwords, tokens, secrets) are masked with
******** in API responses.ServiceNow Example:Whether the integration is currently active and enabled
ISO 8601 timestamp of the last successful sync
Status of the last sync attempt:
success or errorError message from the last sync attempt (if failed)
ISO 8601 timestamp of the last update
UUID of the user who created the integration
List All Integrations
Returns a list of all integrations in the system. Sensitive configuration fields are automatically masked in responses. Required Permission:integration.view
Response
Indicates if the request was successful
Array of integration objects
Error message (only present if success is false)
Example Request
Example Response
Get Integration by ID
Fetches detailed information about a single integration. Required Permission:integration.view
Path Parameters
The UUID of the integration to retrieve
Response
Indicates if the request was successful
The integration object (only present if found)
Error or status message
Example Request
Example Response
Error Response
Create Integration
Creates a new integration configuration. The authenticated user will be associated with the integration. Required Permission:integration.create
Request Body
Name of the external service (e.g., “ServiceNow”, “Jira”, “GitHub”)
Authentication method:
basic_auth, api_token, or oauth2Service-specific configuration object. Required fields vary by service.ServiceNow config:
url(string, required) - ServiceNow instance URLusername(string, required) - ServiceNow usernamepassword(string, required) - ServiceNow passwordlastSynced(string, optional) - Last sync timestamp
Set to
true to enable the integration immediatelyResponse
Indicates if the creation was successful
The created integration object (with sensitive fields masked)
Error message if creation failed
Example Request
Example Response
Update Integration
Updates the configuration of an existing integration. All fields from the request body will replace the current values. Required Permission:integration.edit
Path Parameters
The UUID of the integration to update
Request Body
Name of the external service
Authentication method:
basic_auth, api_token, or oauth2Updated configuration object. This replaces the entire config.
Enable or disable the integration
Response
Indicates if the update was successful
The updated integration object
Error or status message
Example Request
Example Response
Delete Integration
Permanently removes an integration and its configuration. This action cannot be undone. Required Permission:integration.delete
Path Parameters
The UUID of the integration to delete
Response
Indicates if the deletion was successful
Confirmation or error message
Example Request
Example Response
Error Response
Trigger Manual Sync
Initiates a manual sync operation for a ServiceNow integration. This endpoint returns a Server-Sent Events (SSE) stream that provides real-time progress updates. Required Permission:integration.sync
Path Parameters
The UUID of the integration to synchronize
Response
This endpoint returns atext/event-stream response with the following event types:
Event: progress
Emitted periodically during the sync operation.Current batch number being processed
Total number of batches to process
Total number of incidents being synced
Array of incident IDs in the current batch
Human-readable progress message
Event: complete
Emitted when the sync operation completes successfully.Always
true for complete eventsUpdated integration object with new sync timestamps
Statistics about the sync operation:
added(number) - Number of new incidents addedtotal(number) - Total incidents processedlast_synced(string) - New last sync timestamp
Event: error
Emitted if the sync operation fails.Always
false for error eventsError description
Sync Workflow
- Validation - Verifies integration exists and has required config (url, username, password)
- Fetch - Retrieves new incidents from ServiceNow since last sync
- Store - Saves raw incident data to local JSON file
- Ingest - Processes incidents in batches (5 per batch) and stores in knowledge base
- Version - Creates a versioned dataset for the sync operation
- Update - Updates integration with sync status and timestamp
Example Request
Example Response Stream
Error Cases
Integration Not Found:Notes
- The sync operation processes incidents in batches of 5 to provide granular progress updates
- All synced incidents are stored in a versioned dataset for audit and rollback capabilities
- The integration’s
last_synced_attimestamp is only updated on successful completion - If no new incidents are found since the last sync, the operation completes without ingestion
- Raw incident data is saved to
src/data/incidentspulledfromsnow.jsonfor debugging