API · 14 operationer
lifecycle-api
Genererad ur services/lifecycle-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
Deep readiness probe. Checks: 1. DB connectivity — SELECT 1 2. audit_events table accessible — SELECT FROM public.audit_events Returns 503 with detail on first failure.
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
GET /v1/assistants/{assistant_id}/activation-check
Activation Check
Compute activation readiness for an assistant. Requires lifecycle:activation_check scope.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | ActivationCheckResponse application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/change-events
List Change Events
List change events for the tenant, optionally filtered by assistant_id. Results are ordered by processed_at DESC, limited to 100 rows.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | query | string (uuid) | null | nej |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | ChangeEventRead[] application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/obligations-dossier
List Dossiers
List dossiers for a given assistant_id (tenant-scoped).
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | query | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | DossierRead[] application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/obligations-dossier
Create Dossier
Create a new ObligationsDossier. Requires tenant_admin role.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
Kropp: DossierCreate application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
201 | Successful Response | DossierRead application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/obligations-dossier/{dossier_id}
Get Dossier
Fetch a single dossier by id (tenant-scoped).
| Parameter | I | Typ | Krävs |
|---|---|---|---|
dossier_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | DossierRead application/json |
422 | Validation Error | HTTPValidationError application/json |
PATCH /v1/obligations-dossier/{dossier_id}
Patch Dossier
Partially update a dossier. Requires tenant_admin role.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
dossier_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
Kropp: DossierPatch application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | DossierRead application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/obligations-dossier/{dossier_id}/activate
Activate Dossier
Transition dossier from draft to active. Requires tenant_admin role.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
dossier_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | DossierRead application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/obligations-dossier/{dossier_id}/archive
Archive Dossier
Transition dossier to archived. Requires tenant_admin role.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
dossier_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | DossierRead application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/reassessment-tasks
List Tasks
List reassessment tasks with optional filters. Requires tenant_admin role.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | query | string (uuid) | null | nej |
status | query | string | null | nej |
assigned_role | query | string | null | nej |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | TaskRead[] application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/reassessment-tasks
Create Task
Create a new manual ReassessmentTask. Requires tenant_admin role.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
Kropp: TaskCreate application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
201 | Successful Response | TaskRead application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/reassessment-tasks/{task_id}
Get Task
Fetch a single task by id (tenant-scoped). Requires tenant_admin role.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
task_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | TaskRead application/json |
422 | Validation Error | HTTPValidationError application/json |
PATCH /v1/reassessment-tasks/{task_id}
Patch Task
Partially update a task. Requires tenant_admin role.
| Parameter | I | Typ | Krävs |
|---|---|---|---|
task_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
Kropp: TaskPatch application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | TaskRead application/json |
422 | Validation Error | HTTPValidationError application/json |
Scheman
ActivationCheckResponse
| Fält | Typ | Krävs |
|---|---|---|
activatable | boolean | ja |
assistant_id | string (uuid) | ja |
blocking_tasks | BlockingTaskSummary[] | ja |
dossier_status | "active" | "draft" | "missing" | ja |
eval_blockers | EvalBlocker[] | ja |
warning_tasks | WarningTaskSummary[] | ja |
BlockingTaskSummary
| Fält | Typ | Krävs |
|---|---|---|
assigned_role | string | ja |
id | string (uuid) | ja |
task_type | string | ja |
ChangeEventRead
Full representation returned by GET /v1/change-events.
| Fält | Typ | Krävs |
|---|---|---|
assistant_id | string (uuid) | ja |
change_type | string | ja |
changed_at | string (date-time) | ja |
id | string (uuid) | ja |
payload | object | null | ja |
processed_at | string (date-time) | null | ja |
source_audit_event_id | string (uuid) | null | ja |
tenant_id | string (uuid) | ja |
DossierCreate
Body for POST /v1/obligations-dossier.
| Fält | Typ | Krävs |
|---|---|---|
ai_act_classification | "prohibited" | "high_risk" | "limited" | "minimal" | ja |
archetype | "gron" | "gul" | "rod" | null | nej |
assistant_id | string (uuid) | ja |
deployer | "tenant" | "platform" | nej |
dpia_reference | string | null | nej |
gpai_provider | string | null | nej |
intended_use | string | ja |
legal_basis | "consent" | "contract" | "legal_obligation" | "vital_interest" | "public_task" | "legitimate_interest" | ja |
public_record_status | "public" | "confidential" | "mixed" | null | nej |
system_provider | "platform" | "tenant" | "third_party" | nej |
transparency_config | object | nej |
use_case_id | string (uuid) | null | nej |
user_transparency | "required" | "not_required" | "not_applicable" | nej |
DossierPatch
Body for PATCH /v1/obligations-dossier/{id} (all fields optional).
| Fält | Typ | Krävs |
|---|---|---|
ai_act_classification | "prohibited" | "high_risk" | "limited" | "minimal" | null | nej |
archetype | "gron" | "gul" | "rod" | null | nej |
deployer | "tenant" | "platform" | null | nej |
dpia_reference | string | null | nej |
gpai_provider | string | null | nej |
intended_use | string | null | nej |
legal_basis | "consent" | "contract" | "legal_obligation" | "vital_interest" | "public_task" | "legitimate_interest" | null | nej |
public_record_status | "public" | "confidential" | "mixed" | null | nej |
system_provider | "platform" | "tenant" | "third_party" | null | nej |
transparency_config | object | null | nej |
use_case_id | string (uuid) | null | nej |
user_transparency | "required" | "not_required" | "not_applicable" | null | nej |
DossierRead
Full representation returned by GET endpoints.
| Fält | Typ | Krävs |
|---|---|---|
ai_act_classification | "prohibited" | "high_risk" | "limited" | "minimal" | ja |
archetype | "gron" | "gul" | "rod" | null | ja |
assistant_id | string (uuid) | ja |
created_at | string (date-time) | ja |
deployer | "tenant" | "platform" | ja |
dpia_reference | string | null | ja |
gpai_provider | string | null | ja |
id | string (uuid) | ja |
intended_use | string | ja |
legal_basis | "consent" | "contract" | "legal_obligation" | "vital_interest" | "public_task" | "legitimate_interest" | ja |
public_record_status | "public" | "confidential" | "mixed" | null | ja |
status | "draft" | "active" | "archived" | ja |
system_provider | "platform" | "tenant" | "third_party" | ja |
tenant_id | string (uuid) | ja |
transparency_config | object | null | ja |
updated_at | string (date-time) | ja |
use_case_id | string (uuid) | null | ja |
user_transparency | "required" | "not_required" | "not_applicable" | ja |
version | integer | ja |
EvalBlocker
| Fält | Typ | Krävs |
|---|---|---|
code | "eval_set_missing" | "eval_not_run" | "eval_failed" | "eval_status_unavailable" | ja |
message | string | ja |
HTTPValidationError
| Fält | Typ | Krävs |
|---|---|---|
detail | ValidationError[] | nej |
TaskCreate
Body for POST /v1/reassessment-tasks.
| Fält | Typ | Krävs |
|---|---|---|
assigned_role | "DR" | "DPO" | "CAIO" | "ISM" | "arkivarie" | "juridik" | "informationsagare" | ja |
assistant_id | string (uuid) | ja |
blocking | boolean | nej |
due_date | string (date-time) | null | nej |
task_type | string | ja |
TaskPatch
Body for PATCH /v1/reassessment-tasks/{id} (all fields optional).
| Fält | Typ | Krävs |
|---|---|---|
close_reason | string | null | nej |
status | "open" | "in_progress" | "closed" | "cancelled" | null | nej |
TaskRead
Full representation returned by GET endpoints.
| Fält | Typ | Krävs |
|---|---|---|
assigned_role | string | ja |
assistant_id | string (uuid) | ja |
blocking | boolean | ja |
change_event_id | string (uuid) | null | ja |
close_reason | string | null | ja |
closed_at | string (date-time) | null | ja |
closed_by | string | null | ja |
created_at | string (date-time) | ja |
due_date | string (date-time) | null | ja |
id | string (uuid) | ja |
status | string | ja |
task_type | string | ja |
tenant_id | string (uuid) | ja |
updated_at | string (date-time) | ja |
ValidationError
| Fält | Typ | Krävs |
|---|---|---|
ctx | object | nej |
input | any | nej |
loc | string | integer[] | ja |
msg | string | ja |
type | string | ja |
WarningTaskSummary
| Fält | Typ | Krävs |
|---|---|---|
assigned_role | string | ja |
id | string (uuid) | ja |
task_type | string | ja |