AI-Agent-First Documentation
Prompt your Agent: "Query and mutate records on the 'log' table (ID prefix 'log_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."
Log (log)
A collection of logged API requests within the organization
Python SDK & PlatformContext Example
# 1. Query log via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM log ORDER BY created_date DESC LIMIT 25")
# 2. Create log record (Generates 'log_...' Base62 ID)
created = await platform.records.create("log", [
{"name": "Example Log"}
])| Field API Name | Type / Format | Lookup Target | Flags | Description |
|---|---|---|---|---|
| id | string | — | required | Id |
| name | string | — | required | Name |
| created_date | stringdate-time | — | Created Date | |
| modified_date | stringdate-time | — | Modified Date | |
| created_by | stringlookup | → user (string ID) | Created By | |
| modified_by | stringlookup | → user (string ID) | Modified By | |
| header | jsonjson | — | required | The request headers |
| log | stringtext-area | — | The raw logs of what happened during the request | |
| status_code | string | — | required | How the request status code went |
| path | string | — | required | The API path that was called |
| query_parameter | jsonjson | — | required | Any query parameters added to the request |
| start_time | stringdate-time | — | required | When the request started |
| process_time | number | — | How long the request took | |
| end_time | stringdate-time | — | required | When the request ended |
| request_data | stringtext-area | — | Data that was sent in the request | |
| ip_address | string | — | required | The IP Address that sent the request |
| user_agent | string | — | required | The device the user was requesting from |
| status | stringenum | — | Terminal outcome status of the execution: Success, Error, Timeout, or Cancelled. | |
| method | string | — | The method that was called | |
| shared_with | listsharing | — | system | Shared With |
| type | stringenum | — | The runtime engine category: function, record_trigger, automation, or ai_turn. | |
| target_id | stringcompound_lookup | — | Prefixed ID of the executed asset (e.g. fun_..., retr_..., aut_...). | |
| target_name | string | — | API name or display name of the target asset. | |
| duration_ms | number | — | Total execution duration measured in milliseconds. | |
| invoked_by | string | — | Identity or mechanism that triggered this execution (e.g. User ID, Cron Scheduler, Record Trigger, AI Chat session). | |
| error_message | string | — | Single-line summary of any error or exception that occurred during execution. | |
| data_compressed | stringtext-area | — | Compressed Base64 payload containing complete execution inputs, outputs, and stack traces. |
