Overview
The AI analysis endpoints provide Claude-powered change impact analysis. When you have virtual changes staged against a connection, the AI engine analyses them against the full configuration snapshot, returning a risk assessment, summary, and actionable recommendations.
All analysis endpoints require READ_ONLY permission or above. POST is used because of request body size, not because the endpoints modify data.
Analyse virtual changes
POST /v1/analysis/ai
Runs an AI-powered impact analysis on the virtual changes currently staged for the specified connection. You may optionally supply a snapshotId to pin the analysis to a specific configuration snapshot.
| Field | Type | Required | Description |
|---|---|---|---|
connectionId |
string | Yes | The Zendesk connection to analyse |
snapshotId |
string | No | Pin analysis to a specific snapshot |
curl -X POST https://api.configly.app/v1/analysis/ai \
-H "Authorization: Bearer cly_your_key" \
-H "Content-Type: application/json" \
-d '{
"connectionId": "your_connection_id"
}'
The response contains a risk assessment, a human-readable summary, and a list of recommendations.
Usage reporting
GET /v1/analysis/ai/usage
Returns aggregated AI usage statistics for the connection scoped to your API key. Use the days query parameter to set the reporting window (default 30, maximum 365).
curl https://api.configly.app/v1/analysis/ai/usage?days=90 \ -H "Authorization: Bearer cly_your_key"
{
"data": {
"windowDays": 90,
"totalCalls": 47,
"totalInputTokens": 128540,
"totalOutputTokens": 31200,
"totalCostUsd": 1.23
}
}
503 SERVICE_UNAVAILABLE response indicates that the AI analysis service is not configured for your account.Error codes
| Status | Code | Description |
|---|---|---|
| 400 | NO_CHANGES |
No virtual changes are staged for analysis |
| 400 | VALIDATION_ERROR |
Invalid request body or query parameters |
| 401 | INVALID_API_KEY |
Missing or invalid API key |
| 403 | FORBIDDEN |
API key does not have access to this connection |
| 503 | SERVICE_UNAVAILABLE |
AI analysis service is not configured |
| 500 | INTERNAL_ERROR |
An unexpected error occurred during analysis |
For deterministic impact analysis, see Impact analysis.
Comments
0 comments
Please sign in to leave a comment.