Search the Logflare API spec
searchSearch the Logflare API specification by executing JavaScript code in a sandbox to discover endpoints, parameters, and request bodies.
Instructions
Search the Logflare Management API's OpenAPI spec by writing JavaScript. Runs in a network-isolated sandbox.
Your code is an async arrow function that returns a value; it receives spec (all $refs resolved inline):
interface OperationInfo { summary?: string; description?: string; deprecated?: boolean; tags?: string[]; parameters?: Array<{ name: string; in: string; required?: boolean; schema?: unknown; description?: string }>; requestBody?: { required?: boolean; content?: Record<string, { schema?: unknown }> }; responses?: Record<string, { description?: string; content?: Record<string, { schema?: unknown }> }>; } declare const spec: { paths: Record<string, Record<string, OperationInfo>> };
Use this to find endpoints and their parameters/request bodies before calling execute_read/execute_write. Output over 100k chars is truncated — return small slices.
Example — find endpoints for sources (grouped by path): async () => Object.entries(spec.paths) .filter(([path]) => path.includes('/sources')) .map(([path, ops]) => ({ path, methods: Object.keys(ops) }))
Example — inspect one operation's request body and parameters: async () => spec.paths['/api/sources']?.post
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Async arrow function receiving `spec`; must return a value. |