AI-Agent-First Documentation
Prompt your Agent: "Query and mutate records on the 'api_trigger' table (ID prefix 'aptr_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."
Api Trigger (api_trigger)
Creates an API endpoint to run code at Valstorm
Python SDK & PlatformContext Example
# 1. Query api_trigger via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM api_trigger ORDER BY created_date DESC LIMIT 25")
# 2. Create api_trigger record (Generates 'aptr_...' Base62 ID)
created = await platform.records.create("api_trigger", [
{"name": "Example Api Trigger"}
])| Field API Name | Type / Format | Lookup Target | Flags | Description |
|---|---|---|---|---|
| id | string | — | system | Id |
| name | string | — | Name | |
| created_date | stringdate-time | — | system | Created Date |
| modified_date | stringdate-time | — | system | Modified Date |
| created_by | stringlookup | → user (string ID) | system | Created By |
| modified_by | stringlookup | → user (string ID) | system | Modified By |
| method | string | — | required | Method |
| path | string | — | required | Path |
| file_name | string | — | required | File Name |
| method_name | string | — | required | Method Name |
| code | stringtext-area | — | Code | |
| app | stringlookup | → app (string ID) | App | |
| shared_with | listsharing | — | system | Shared With |
