English
Audit Logs
Operation Log Query

Operation Log Query

View, filter, and analyze the complete operation history of your content files.


View audit logs

PuppyOne provides two ways to view audit logs: Dashboard and API.

Dashboard

  1. Open your Project and go to the Data page
  2. Select the target file or folder
  3. Click the Audit tab in the right panel
  4. Review all recorded operations for that node

API

Call the REST API to fetch audit logs for a specific path:

curl -X GET "https://api.puppyone.ai/api/v1/nodes/{path}/audit-logs" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example response:

{
  "logs": [
    {
      "actor": "[email protected]",
      "action": "update",
      "node_path": "/docs/readme.md",
      "timestamp": "2025-03-09T14:30:00Z",
      "metadata": {
        "source": "dashboard",
        "version": 5
      }
    },
    {
      "actor": "Research Agent",
      "action": "update",
      "node_path": "/docs/readme.md",
      "timestamp": "2025-03-09T12:15:00Z",
      "metadata": {
        "source": "mcp",
        "version": 4
      }
    }
  ]
}

Log entry structure

Each audit log entry includes the following fields:

FieldTypeDescription
actorstringThe actor identity - user email (for example [email protected]) or agent name (for example Research Agent)
actionstringOperation type; see the list below
node_pathstringPath of the content file being operated on
timestampstringTime of the operation (ISO 8601 format)
metadataobjectExtra information such as source and version number

Operation types

Operation TypeDescriptionTypical Scenario
createCreate a new file or folderCreating a file via mkdir or write; an agent generates new content
updateModify file contentEditing a file; an agent updates data
deleteDelete a file or folderRemoving a file via rm
rollbackRoll back to a historical versionRestore an earlier version
syncSync from an external data sourceConnector sync from Notion, GitHub, etc.
moveMove or rename a fileRenaming via mv

Filtering and search

For granular filtering by actor, time range, or action type, two approaches are recommended:

  1. Fetch the logs via the API and filter programmatically
  2. Use jq or a script to process the JSON response
# Fetch audit logs and filter with jq
curl -s -X GET "https://api.puppyone.ai/api/v1/nodes/docs%2Freadme.md/audit-logs" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  | jq '.logs[] | select(.actor == "Research Agent")'

Real scenarios

Scenario 1: Who modified this file last?

curl -X GET "https://api.puppyone.ai/api/v1/nodes/specs%2Fapi-design.md/audit-logs" \
  -H "Authorization: Bearer YOUR_TOKEN"

The most recent operation appears at the top of the log, so you can immediately see who changed it and when.

Scenario 2: What did an agent do in the last 24 hours?

# Fetch all audit logs for the project root and filter
curl -s -X GET "https://api.puppyone.ai/api/v1/nodes//audit-logs" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  | jq '[.logs[] | select(.actor == "Content Writer")]'

Filter for the agent's entries from the last 24 hours to confirm it behaved as expected.

Scenario 3: Track all changes in a folder

curl -X GET "https://api.puppyone.ai/api/v1/nodes/products/audit-logs" \
  -H "Authorization: Bearer YOUR_TOKEN"

Inspect the complete operation history under /products.

Scenario 4: Investigate bad data

When data looks incorrect, use the audit log to identify the change that introduced the issue:

# View the full operation history of the file
curl -X GET "https://api.puppyone.ai/api/v1/nodes/data%2Fpricing.json/audit-logs" \
  -H "Authorization: Bearer YOUR_TOKEN"
 
# Pair it with version history to compare before and after
curl -X GET "https://api.puppyone.ai/api/v1/content/{project_id}/versions?path=/data/pricing.json" \
  -H "Authorization: Bearer {token}"

Once you find the problematic change, you can restore the data with version rollback.


Next steps