Audit Event Log Payload
Payload for all audit log events. Every audit entry — regardless of category or code — uses this schema. The specific action is identified via audit.reference; Lambda routing branches on that field without platform changes.
| $id | https://schemas.texecom-prod.com/v2/events/payload/service/audit/event/log/v1.0.0.json |
| $schema | http://json-schema.org/draft-07/schema |
Properties
actor
| Description |
Who performed the action. |
| Type | Object |
| Required |
Yes |
Properties
actor.userId
| Description |
Numeric user ID from the audit_log table. 0 for system-initiated events. |
| Type | Integer |
| Required |
Yes |
actor.userGroupId
| Description |
Numeric user group ID from the audit_log table. 0 for system-initiated events. |
| Type | Integer |
| Required |
Yes |
actor.username
| Description |
Human-readable username (str_user argument in fern.Audit.log()). Null for system-initiated events. |
| Type | [string, null] |
| Required |
Yes |
actor.actorType
| Description |
system when userId is 0, user otherwise. |
| Type | String |
| Required |
Yes |
| Enum |
|
audit
| Description |
What happened — self-describing, no database or code lookups required to interpret. |
| Type | Object |
| Required |
Yes |
Properties
audit.reference
| Description |
String key from fern.Audit.Codes, e.g. UserLoggedIn. Used for Lambda internal routing. |
| Type | String |
| Required |
Yes |
audit.categoryId
| Description |
Numeric audit_log_category, embedded at write time. |
| Type | Integer |
| Required |
Yes |
audit.categoryName
| Description |
Human-readable category name resolved from fern.Audit.Categories at write time. |
| Type | String |
| Required |
Yes |
audit.code
| Description |
Numeric audit_log_code. |
| Type | Integer |
| Required |
Yes |
audit.description
| Description |
Human-readable description resolved from fern.Audit.Codes at write time. |
| Type | String |
| Required |
Yes |
attributes
| Description |
Named contextual fields replacing the generic data1-4 and text columns. Keys are camelCase labels registered in fern.Audit.Codes. Fields with an empty label are omitted. |
| Type | Object |
| Required |
Yes |
Schema
{
"$id": "https://schemas.texecom-prod.com/v2/events/payload/service/audit/event/log/v1.0.0.json",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Audit Event Log Payload",
"description": "Payload for all audit log events. Every audit entry — regardless of category or code — uses this schema. The specific action is identified via audit.reference; Lambda routing branches on that field without platform changes.",
"type": "object",
"properties": {
"actor": {
"description": "Who performed the action.",
"type": "object",
"properties": {
"userId": {
"description": "Numeric user ID from the audit_log table. 0 for system-initiated events.",
"type": "integer"
},
"userGroupId": {
"description": "Numeric user group ID from the audit_log table. 0 for system-initiated events.",
"type": "integer"
},
"username": {
"description": "Human-readable username (str_user argument in fern.Audit.log()). Null for system-initiated events.",
"type": [
"string",
"null"
]
},
"actorType": {
"description": "system when userId is 0, user otherwise.",
"type": "string",
"enum": [
"user",
"system"
]
}
},
"required": [
"userId",
"userGroupId",
"username",
"actorType"
],
"additionalProperties": false
},
"audit": {
"description": "What happened — self-describing, no database or code lookups required to interpret.",
"type": "object",
"properties": {
"reference": {
"description": "String key from fern.Audit.Codes, e.g. UserLoggedIn. Used for Lambda internal routing.",
"type": "string"
},
"categoryId": {
"description": "Numeric audit_log_category, embedded at write time.",
"type": "integer"
},
"categoryName": {
"description": "Human-readable category name resolved from fern.Audit.Categories at write time.",
"type": "string"
},
"code": {
"description": "Numeric audit_log_code.",
"type": "integer"
},
"description": {
"description": "Human-readable description resolved from fern.Audit.Codes at write time.",
"type": "string"
}
},
"required": [
"reference",
"categoryId",
"categoryName",
"code",
"description"
],
"additionalProperties": false
},
"attributes": {
"description": "Named contextual fields replacing the generic data1-4 and text columns. Keys are camelCase labels registered in fern.Audit.Codes. Fields with an empty label are omitted.",
"type": "object",
"additionalProperties": {
"type": [
"string",
"integer",
"null"
]
}
}
},
"required": [
"actor",
"audit",
"attributes"
],
"additionalProperties": false
}