Files
2026-05-21 14:27:53 +00:00

77 lines
1.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hwlab.pikastech.local/protocol/schemas/audit-event.schema.json",
"title": "HWLAB Audit Event",
"type": "object",
"required": [
"auditId",
"traceId",
"actorType",
"actorId",
"action",
"targetType",
"targetId",
"serviceId",
"environment",
"occurredAt"
],
"properties": {
"auditId": {
"$ref": "common.json#/$defs/id"
},
"traceId": {
"$ref": "common.json#/$defs/id"
},
"actorType": {
"$ref": "common.json#/$defs/actorType"
},
"actorId": {
"$ref": "common.json#/$defs/id"
},
"action": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"
},
"targetType": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"targetId": {
"$ref": "common.json#/$defs/id"
},
"projectId": {
"$ref": "common.json#/$defs/id"
},
"gatewaySessionId": {
"$ref": "common.json#/$defs/id"
},
"workerSessionId": {
"$ref": "common.json#/$defs/id"
},
"operationId": {
"$ref": "common.json#/$defs/id"
},
"serviceId": {
"$ref": "common.json#/$defs/serviceId"
},
"environment": {
"$ref": "common.json#/$defs/environment"
},
"outcome": {
"$ref": "common.json#/$defs/auditOutcome"
},
"reason": {
"type": "string",
"maxLength": 512
},
"metadata": {
"$ref": "common.json#/$defs/jsonObject"
},
"occurredAt": {
"$ref": "common.json#/$defs/timestamp"
}
},
"additionalProperties": false
}