API · 10 operationer
feedback-api
Genererad ur services/feedback-api/openapi.json, kontraktsversion 0.1.0. Auth-modell och anropare står i atlasen.
GET /healthz
Healthz
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | { [nyckel]: string } application/json |
GET /readyz
Readyz
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | { [nyckel]: string } application/json |
GET /v1/assistants/{assistant_id}/quality-signals
Get Quality Signals
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | QualitySignalsResponse application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/feedback
List Admin
| Parameter | I | Typ | Krävs |
|---|---|---|---|
sinceISO-8601 lower bound (inclusive) | query | string (date-time) | ja |
name | query | string | null | nej |
cursor | query | string | null | nej |
limit | query | integer | nej |
assistant_idBara betyg på spår som tjänsten svarade på (via usage_events) | query | string (uuid) | null | nej |
authorization | header | string | null | nej |
X-Tenant-Id | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | ScoreList application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/feedback
Post Feedback
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
X-Tenant-Id | header | string | null | nej |
Kropp: ScoreCreate application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | ScoreResponse application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/feedback/erase
Erase Feedback By Traces
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
X-Tenant-Id | header | string | null | nej |
Kropp: TraceIdsBody application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | EraseByTracesResponse application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/feedback/query
Query Feedback By Traces
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
X-Tenant-Id | header | string | null | nej |
Kropp: TraceIdsBody application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | QueryByTracesResponse application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/feedback/tenants/{tenant_id}/export
Export Tenant
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | TenantExport application/json |
422 | Validation Error | HTTPValidationError application/json |
DELETE /v1/feedback/{score_id}
Delete Feedback
| Parameter | I | Typ | Krävs |
|---|---|---|---|
score_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
X-Tenant-Id | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
204 | Successful Response | — |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/feedback/{trace_id}
Get By Trace
| Parameter | I | Typ | Krävs |
|---|---|---|---|
trace_id | path | string | ja |
authorization | header | string | null | nej |
X-Tenant-Id | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | ScoreListByTraceResponse application/json |
422 | Validation Error | HTTPValidationError application/json |
Scheman
CoverageGap
En store exporten INTE täcker, med ett ärligt skäl. `store` måste vara IDENTISK med namnet i `covered` när en store demoteras (t.ex. `page_truncated_over_500`), så en konsument kan korrelera flytten. Se regel (c) i docs/tenant-export-coverage.md.
| Fält | Typ | Krävs |
|---|---|---|
reason | string | ja |
store | string | ja |
EraseByTracesResponse
| Fält | Typ | Krävs |
|---|---|---|
erased | integer | ja |
HTTPValidationError
| Fält | Typ | Krävs |
|---|---|---|
detail | ValidationError[] | nej |
MissedQuestion
| Fält | Typ | Krävs |
|---|---|---|
count | integer | ja |
question | string | ja |
QualitySignalsResponse
| Fält | Typ | Krävs |
|---|---|---|
assistant_id | string (uuid) | ja |
escalation_rate | number | null | nej |
period | string | ja |
thumbs_down | integer | ja |
thumbs_down_prev_period | integer | ja |
thumbs_up | integer | ja |
top_missed_questions | MissedQuestion[] | null | nej |
QueryByTracesResponse
| Fält | Typ | Krävs |
|---|---|---|
items | ScoreResponse[] | ja |
ScoreCreate
| Fält | Typ | Krävs |
|---|---|---|
client_id | string (uuid) | null | nej |
comment | string | null | nej |
name | string | ja |
trace_id | string | ja |
value_category | string | null | nej |
value_numeric | number | null | nej |
ScoreList
| Fält | Typ | Krävs |
|---|---|---|
count | integer | ja |
next_cursor | string | null | nej |
scores | ScoreResponse[] | ja |
ScoreListByTraceResponse
| Fält | Typ | Krävs |
|---|---|---|
count | integer | ja |
scores | ScoreResponse[] | ja |
ScoreResponse
| Fält | Typ | Krävs |
|---|---|---|
client_id | string (uuid) | null | ja |
comment | string | null | ja |
created_at | string (date-time) | ja |
deleted_at | string (date-time) | null | ja |
id | string (uuid) | ja |
name | string | ja |
tenant_id | string (uuid) | ja |
trace_id | string | ja |
value_category | string | null | ja |
value_numeric | number | null | ja |
TenantExport
En producents svar. `extra="forbid"` medvetet: bevarar de tre befintliga typade deklarationernas beteende, OCH gör att en producent som lägger ett fält utan att koordinatorn lär sig om det failar högt i stället för tyst.
| Fält | Typ | Krävs |
|---|---|---|
coverage | TenantExportCoverage | ja |
data | object | ja |
generated_at | string (date-time) | ja |
service | string | ja |
tenant_id | string (uuid) | ja |
TenantExportCoverage
| Fält | Typ | Krävs |
|---|---|---|
covered | string[] | ja |
not_covered | CoverageGap[] | ja |
TraceIdsBody
| Fält | Typ | Krävs |
|---|---|---|
trace_ids | string[] | ja |
ValidationError
| Fält | Typ | Krävs |
|---|---|---|
ctx | object | nej |
input | any | nej |
loc | string | integer[] | ja |
msg | string | ja |
type | string | ja |