WorkOS
audit_logs.events.create
Create an Audit Log Event. This API supports idempotency which guarantees that performing the same operation multiple times will have the same result as if the operation were performed only once. This is handy in situations where you may need to retry a request due to a failure or prevent accidental duplicate requests from creating more than one resource. To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value. Each subsequent request matching this unique string will return the same response. We suggest using [v4 UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) for idempotency keys to avoid collisions. Idempotency keys expire after 24 hours. The API will generate a new response if you submit a request with an expired key.
Other tools also called audit_logs.events.create?
See providers with this name
Input Schema
{
"type": "object",
"properties": {
"event": {
"type": "object",
"required": [
"action",
"occurred_at",
"actor",
"targets",
"context"
],
"properties": {
"actor": {
"type": "object",
"required": [
"id",
"type"
],
"properties": {
"id": {
"type": "string",
"description": "Actor identifier."
},
"name": {
"type": "string",
"description": "Optional actor name."
},
"type": {
"type": "string",
"description": "Actor type."
},
"metadata": {
"type": "object",
"description": "Additional data associated with the event or entity."
}
}
},
"action": {
"type": "string",
"description": "Identifier of what happened."
},
"context": {
"type": "object",
"required": [
"location"
],
"properties": {
"location": {
"type": "string",
"description": "IP Address or some other geolocation identifier."
},
"user_agent": {
"type": "string",
"description": "User agent string."
}
}
},
"targets": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"type"
],
"properties": {
"id": {
"type": "string",
"description": "Target identifier."
},
"name": {
"type": "string",
"description": "Optional target name."
},
"type": {
"type": "string",
"description": "Target type."
},
"metadata": {
"type": "object",
"description": "Additional data associated with the event or entity."
}
}
},
"description": "The resources affected by the action."
},
"version": {
"type": "integer",
"description": "What schema version the event is associated with."
},
"metadata": {
"type": "object",
"description": "Additional data associated with the event or entity."
},
"occurred_at": {
"type": "string",
"format": "date-time",
"description": "ISO-8601 value of when the action occurred."
}
}
},
"organization_id": {
"type": "string",
"description": "The unique ID of the Organization."
}
}
}