create_endpoint
Write-only schema tool: creates one route DEFINITION record in the project's schema. It does NOT call any API, send any HTTP request, or read or write application data — method below configures which verb the route being defined will answer, it is not a verb this tool performs. Use list_endpoints to read routes back.
What it defines: a custom, non-CRUD REST route attached to an entity, e.g. POST /orders/summary. This record IS the route's identity — its action word, HTTP method, auth mode and execution mode. It runs no code by itself: attach one or more Functions to it via create_function(entity_id=<this endpoint's returned id>, trigger_point='endpoint') — an endpoint's own id, not the entity's, is what a Function's entity_id must reference for that trigger point. Read the aaly://platform/functions resource before your first one.
auth: 'required' (default) behaves exactly like ordinary CRUD — callers need a valid token. 'public' accepts requests with NO Authorization header at all — there is no caller identity for its Functions to act as, so they typically call back into the project's own REST API using an API key stored via set_secret rather than an inherited token. There is no per-endpoint permission scoping yet: a public route is exactly as powerful as whatever key its Functions use, so treat a stored key backing a public route as a full-privilege service account and validate its input defensively (create_field with entity_id set to this endpoint's id, location 'body'/'query', turns on real request validation instead of accepting free-form JSON).
No nested paths: the URL is always /{entity}/{action}, exactly one path segment after the entity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | No | Defaults to 'required'. See the tool description above. | |
| label | No | ||
| action | Yes | URL path segment after the entity, e.g. 'summary' for /orders/summary. Lowercase letters, digits and hyphens, starting with a letter. | |
| method | Yes | Configuration only — the single HTTP method the route being defined will respond to when a client later calls it. This tool sends no request of its own. Create a separate endpoint for another method on the same action. | |
| entity_id | Yes | The entity this route is attached to (e.g. 'ENT7'). The URL becomes /{entity}/{action}. | |
| project_id | No | Optional if whoami returned a default_project_id. | |
| description | No | What this route does — surfaced in the generated OpenAPI spec. | |
| execution_mode | No | Defaults to 'synchronous': the attached Functions' final output becomes the HTTP response. 'asynchronous': the caller gets an immediate 202 acknowledgement and the Functions run in the background. |