SparkientDocs
Api reference

Logs

GET
/api/v1/decision-types/{decision_type_id}/logs

Query decision logs with filtering and pagination.

Authorization

AuthorizationBearer <token>

A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.

In: header

Path Parameters

decision_type_id*Decision Type Id
Formatuuid

Query Parameters

page?Page
Range1 <= value
Default1
page_size?Page Size
Range1 <= value <= 100
Default20
decision?|

Filter by decision value

escalated?|

Filter by escalation status

min_confidence?|

Minimum confidence

max_confidence?|

Maximum confidence

start_time?|

Filter logs after this time (ISO 8601)

end_time?|

Filter logs before this time (ISO 8601)

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/logs"
{}
GET
/api/v1/decision-types/{decision_type_id}/logs/export

Export decision logs as JSON or CSV.

Streams results for efficient handling of large datasets.

Authorization

AuthorizationBearer <token>

A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.

In: header

Path Parameters

decision_type_id*Decision Type Id
Formatuuid

Query Parameters

format?ExportFormat

Export format: json or csv

Default"json"

Value in

  • "json"
  • "csv"
decision?|

Filter by decision value

escalated?|

Filter by escalation status

min_confidence?|null
max_confidence?|null
start_time?|

Filter logs after this time

end_time?|

Filter logs before this time

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/logs/export"
null
GET
/api/v1/decision-types/{decision_type_id}/metrics

Get aggregated metrics for the last 24 hours.

Returns total_decisions, avg_confidence, avg_latency_ms, escalation_rate, and decision_distribution.

Authorization

AuthorizationBearer <token>

A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.

In: header

Path Parameters

decision_type_id*Decision Type Id
Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/metrics"
{}