Internal Metrics
POST /api/v2/metrics/internal_metrics
The internal_metrics
endpoint computes and returns detailed statistical data about your Arcanna.ai models' behavior and performance. This endpoint provides comprehensive analytics across four main categories: evaluation metrics (accuracy, precision, recall), confidence scores over time, training dataset statistics, and decision point analysis.
The API supports flexible filtering and time-based aggregation, allowing you to analyze specific subsets of your data across custom time ranges. You can retrieve metrics for individual jobs or across your entire platform, with options to group results by hourly, daily, or weekly intervals. All metrics are calculated separately for new data versus data already in your knowledge base, and can be viewed at both the overall level and per-model level for detailed comparison.
Quick start examples
Get metrics for all jobs
curl -X POST 'https://arcanna.domain/api/v2/metrics/internal_metrics' \
-H 'Content-Type: application/json' \
-H 'X-Arcanna-Api-Key: YOUR_API_KEY'
Specific jobs with 7-day buckets and time window
curl -X POST 'http://arcanna.domain/api/v2/metrics/internal_metrics?job_ids=101&job_ids=202&aggregation_time_interval=7d&start_datetime=2025-09-01T00:00:00Z&end_datetime=2025-09-30T23:59:59Z' \
-H 'Content-Type: application/json' \
-H 'X-Arcanna-Api-Key: YOUR_API_KEY'
Single job with filters in body
curl -X POST 'http://arcanna.domain/api/v2/metrics/internal_metrics?job_ids=101' \
-H 'Content-Type: application/json' \
-H 'X-Arcanna-Api-Key: YOUR_API_KEY' \
-d '{
"filters": [
{"field":"severity","operator":"is","value":"high"},
{"field":"status","operator":"is not","value":"closed"}
]
}'
Query parameters
- job_ids: single int or repeated param for multiple (e.g.,
job_ids=1&job_ids=2
). Optional. - aggregation_time_interval: string like
1d
,7d
,15d
,30d
. Optional; when omitted, metrics are not split by time interval. - obfuscate_decision_points_names: boolean, default
false
. - obfuscate_usernames: boolean, default
true
. - start_datetime: ISO-8601 datetime (e.g.,
2025-09-01T00:00:00Z
). Optional. - end_datetime: ISO-8601 datetime. Optional.
- recompute_model_metrics: boolean, default
true
. When enabled, may trigger background recomputation; warnings can be returned if still pending. - latest_n_models_to_recompute: integer, default
2
. Returned models list will always include the active model even if not in the latest N. - timeout_s: integer seconds to wait for metrics refresh, default
120
.
Request body (JSON)
- filters: array of filter objects. Optional.
- field: The specific data field to apply the filter to
- operator: Comparison method ('is', 'is not', 'contains', 'exists', 'gt', 'lt', etc.)
- value: The criteria used by the operator to filter the field
Response overview
- endpoint_warnings: list of strings with non-fatal issues (e.g., metrics still recomputing).
- endpoint_request_parameters: echo of resolved inputs (job ids, interval, obfuscation flags, time window, filters, recompute settings, timeout, current timestamp).
- job_metrics: object keyed by job id (as string) → per-job metrics.
- Each job includes:
- job_id: number
- job_settings: job configuration snapshot
- job_metrics: job-level metrics (counters, confusion-matrix-like metrics, per-decision stats, etc.)
- model_metrics: object keyed by model id →
{ evaluation, scores, decision_points }
- feedback_metrics: aggregated user feedback metrics for the job
- Each job includes:
- overall_feedback_metrics: global feedback metrics aggregated across the requested jobs.
Skeleton:
{
"endpoint_warnings": ["Metrics for models ['model_X'] are still recomputing."],
"endpoint_request_parameters": {
"job_ids": [101, 202],
"aggregation_time_interval": "7d",
"obfuscate_decision_points_names": false,
"obfuscate_usernames": true,
"start_datetime": "2025-09-01T00:00:00Z",
"end_datetime": "2025-09-30T23:59:59Z",
"filters": [
{"field":"severity","operator":"is","value":"high"}
],
"recompute_model_metrics": true,
"latest_n_models_to_recompute": 2,
"timeout_s": 120,
"current_timestamp": "2025-10-06T12:34:56Z"
},
"job_metrics": {
"101": {
"job_id": 101,
"job_settings": { "...": "..." },
"job_metrics": {
"...": "job-level counters and per-decision stats"
},
"model_metrics": {
"model_2025_09_01": {
"evaluation": { "...": "..." },
"scores": { "...": "..." },
"decision_points": { "...": "..." }
}
},
"feedback_metrics": { "...": "..." }
}
},
"overall_feedback_metrics": { "...": "..." }
}
Notes:
- If
job_ids
is omitted, the endpoint computes metrics for all permitted jobs. - If recomputation is enabled and still running, expect a warning and partial metrics until it completes.