Audit

Audit logs and signed attestations.

7 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors

List audit log entries

GET /api/v1/organizations/{id}/audit-logs
Badge

Path parameters

  • id string required

Query parameters

  • offset integer
    Number of items to skip.
    Default: 0
  • limit integer
    Maximum number of items to return.
    Default: 200 Min: 1 Max: 200
  • since string<date-time>
    Only entries at or after this time.
  • until string<date-time>
    Only entries at or before this time.
  • events string
    Comma-separated event names. A name also matches its dot-suffixed descendants.
  • actor_user_id string<uuid>
    Only entries by this user.
  • target_user_id string<uuid>
    Only entries about this user.

Response 200 OK application/json

  • items array[object]
    • actor object nullable
      • email string nullable
      • identity_fingerprint string nullable
      • identity_id string<uuid>
      • name string nullable
      • user_id string<uuid>
    • created_at string<date-time>
    • curr map[any] nullable
    • event string
    • id string<uuid>
    • metadata map[any] nullable
    • organization object
      • id string<uuid>
      • name string
    • origin string nullable
    • prev map[any] nullable
    • target object nullable
      • email string
      • name string
      • user_id string<uuid>
  • total integer

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/organizations/{id}/audit-logs' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "items": [
    {
      "actor": {
        "email": "string",
        "identity_fingerprint": "string",
        "identity_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
        "name": "string",
        "user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
      },
      "created_at": "2026-01-01T00:00:00Z",
      "curr": {
        "key": {}
      },
      "event": "string",
      "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "metadata": {
        "key": {}
      },
      "organization": {
        "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
        "name": "string"
      },
      "origin": "string",
      "prev": {
        "key": {}
      },
      "target": {
        "email": "string",
        "name": "string",
        "user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
      }
    }
  ],
  "total": 0
}

Export the audit log

GET /api/v1/organizations/{id}/audit-logs/export
Badge

Path parameters

  • id string required

Query parameters

  • since string<date-time>
    Only entries at or after this time.
  • until string<date-time>
    Only entries at or before this time.
  • events string
    Comma-separated event names. A name also matches its dot-suffixed descendants.
  • actor_user_id string<uuid>
    Only entries by this user.
  • target_user_id string<uuid>
    Only entries about this user.
  • after_seq integer<int64>
    Resume after this chain sequence number. Not combinable with the filters or with csv.
  • format string
    Export format.
    Allowed: jsonl, cef, leef, csv Default: "jsonl"

Response 200 The audit log, in the requested format application/x-ndjson

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/organizations/{id}/audit-logs/export' \
  -H 'Authorization: Bearer <badge>'

Get the key that signs audit exports

GET /api/v1/organizations/{id}/audit-logs/signing-key
Badge

Path parameters

  • id string required

Response 200 OK application/json

  • algorithm string
  • fingerprint string
  • public_key string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/organizations/{id}/audit-logs/signing-key' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "algorithm": "string",
  "fingerprint": "string",
  "public_key": "string"
}

Export the legal hold attestation

GET /api/v1/organizations/{id}/legal-hold/export
Badge

Path parameters

  • id string required

Query parameters

  • format string
    Export format.
    Allowed: jsonl, cef, leef Default: "jsonl"

Response 200 The signed attestation, in the requested format application/x-ndjson

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/organizations/{id}/legal-hold/export' \
  -H 'Authorization: Bearer <badge>'

Get the key that signs legal hold attestations

GET /api/v1/organizations/{id}/legal-hold/signing-key
Badge

Path parameters

  • id string required

Response 200 OK application/json

  • algorithm string
  • fingerprint string
  • public_key string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/organizations/{id}/legal-hold/signing-key' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "algorithm": "string",
  "fingerprint": "string",
  "public_key": "string"
}

Export the residency attestation

GET /api/v1/organizations/{id}/residency/export
Badge

Path parameters

  • id string required

Query parameters

  • format string
    Export format.
    Allowed: jsonl, cef, leef Default: "jsonl"

Response 200 The signed attestation, in the requested format application/x-ndjson

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/organizations/{id}/residency/export' \
  -H 'Authorization: Bearer <badge>'

Get the key that signs residency attestations

GET /api/v1/organizations/{id}/residency/signing-key
Badge

Path parameters

  • id string required

Response 200 OK application/json

  • algorithm string
  • fingerprint string
  • public_key string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/organizations/{id}/residency/signing-key' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "algorithm": "string",
  "fingerprint": "string",
  "public_key": "string"
}