Aktivitetslog
Hent aktivitetslog
GET/api/v1/kyc/cases/:id/audit-log
Hent den fulde audit trail — alle handlinger, ændringer og søgninger for en KYC-sag.
Scope: kyc:read
Path parametre
| Parameter | Type | Beskrivelse |
|---|---|---|
id | integer | KYC-sagens ID |
Query parametre
| Parameter | Type | Standard | Beskrivelse |
|---|---|---|---|
action | string | — | Filtrer på handlingstype (ANSWER_SAVED, SANCTIONS_SEARCH, osv.) |
page | integer | 1 | Sidetal |
page_size | integer | 25 | Resultater pr. side (1-100) |
Response-felter
| Felt | Type | Beskrivelse |
|---|---|---|
id | integer | Log-ID |
user | string | Brugernavn |
entity_type | string | Enhedstype (kyc_case, kyc_answer, osv.) |
action | string | Handling (ANSWER_SAVED, STATUS_CHANGED, osv.) |
field | string | null | Ændret felt |
old_value | string | null | Gammel værdi |
new_value | string | null | Ny værdi |
reason | string | null | Begrundelse |
timestamp | string | Tidspunkt |
Eksempel
- curl
- JavaScript
- Python
# Alle logposter
curl "https://auditply.dk/api/v1/kyc/cases/42/audit-log" \
-H "X-API-Key: ap_live_..."
# Kun sanktionssøgninger
curl "https://auditply.dk/api/v1/kyc/cases/42/audit-log?action=SANCTIONS_SEARCH" \
-H "X-API-Key: ap_live_..."
const res = await fetch(
"https://auditply.dk/api/v1/kyc/cases/42/audit-log?page_size=50",
{ headers: { "X-API-Key": apiKey } }
);
const { data, pagination } = await res.json();
response = requests.get(
"https://auditply.dk/api/v1/kyc/cases/42/audit-log",
headers={"X-API-Key": api_key},
params={"action": "STATUS_CHANGED"}
)
Response — 200 OK
{
"data": [
{
"id": 501,
"user": "Martin Hansen",
"entity_type": "kyc_case",
"action": "STATUS_CHANGED",
"field": "status",
"old_value": "PENDING_REVIEW",
"new_value": "REVIEWED",
"reason": null,
"timestamp": "2025-03-10T09:15:00.000Z"
},
{
"id": 495,
"user": "Anna Jensen",
"entity_type": "kyc_answer",
"action": "ANSWER_SAVED",
"field": "value",
"old_value": null,
"new_value": "YES",
"reason": null,
"timestamp": "2025-02-10T11:30:00.000Z"
}
],
"pagination": {
"page": 1,
"page_size": 25,
"total_count": 47,
"total_pages": 2,
"has_more": true
},
"meta": {
"api_version": "v1",
"timestamp": "2026-04-13T12:00:00.000Z"
}
}