Skip to main content
POST
/
v1
/
audit-events
Create audit event
curl --request POST \
  --url https://api.clinikapi.com/v1/audit-events \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "type": "<string>",
  "recorded": "<string>",
  "agent": [
    {
      "who": "<string>",
      "requestor": true,
      "name": "<string>",
      "role": "<string>",
      "networkAddress": "<string>"
    }
  ],
  "source": {
    "observer": "<string>",
    "site": "<string>",
    "type": "<string>"
  },
  "subtype": [
    "<string>"
  ],
  "action": "<string>",
  "outcome": "<string>",
  "outcomeDesc": "<string>",
  "purposeOfEvent": [
    "<string>"
  ],
  "entity": [
    {
      "what": "<string>",
      "type": "<string>",
      "role": "<string>",
      "name": "<string>",
      "description": "<string>"
    }
  ]
}
'

Authorizations

x-api-key
string
header
required

Your ClinikAPI secret key (clk_live_* or clk_test_*)

Body

application/json
type
string
required

Event type code (e.g. rest, login, export)

Maximum string length: 200
recorded
string
required

ISO 8601 timestamp

Maximum string length: 50
agent
object[]
required
Required array length: 1 - 20 elements
source
object
required
subtype
string[]
Maximum array length: 10
Maximum string length: 200
action
string

C, R, U, D, E

Maximum string length: 10
outcome
string

0=success, 4=minor, 8=serious, 12=major

Maximum string length: 10
outcomeDesc
string
Maximum string length: 2000
purposeOfEvent
string[]
Maximum array length: 10
Maximum string length: 200
entity
object[]
Maximum array length: 20

Response

201

Audit event created