API documentation
altengine exposes two data-plane services over a single REST/JSON API: a Search API for full-text search and a Channel API for realtime pub/sub. Both are faithful to the App Engine services they revive, so moving over is a base-URL and credentials change rather than a rewrite.
Base URL
All API requests go to a single host over HTTPS:
https://api.altengine.netThe console — where you create instances, mint API keys, browse data, and see usage — lives separately at https://console.altengine.net.
Authentication
Every data-plane request is authenticated with an organization API key, passed as a bearer token:
Authorization: Bearer ae_yourkeyid.your-api-key-secretCreate keys in the console. A key belongs to your organization and is granted access to one or more service instances at a specific level. Keep keys secret — they carry the access below and should never ship in client-side code. For browser pub/sub, mint a short-lived, channel-scoped subscriber token instead of exposing your API key.
Grant levels
| Grant | Permits |
|---|---|
read | Search and read documents; list indexes and read schema; mint subscribe-only channel tokens. |
write | Everything in read, plus put documents, publish messages, and mint publish-capable channel tokens. |
full | Everything in write, plus delete documents and drop indexes. |
Instances
You provision named instances of each service in the console — for example a search instance catalog or a channel instance live. The instance name is the first path segment after the service:
/v1/search/{instance}/...
/v1/channel/{instance}/...Search instances are further divided into indexes, and optionally namespaces (multi-tenancy) — see the Search API reference.
Quickstart
Index a document and search it (an index is created on first write):
curl -X PUT https://api.altengine.net/v1/search/catalog/indexes/films/documents \
-H "Authorization: Bearer $ALTENGINE_KEY" \
-H "Content-Type: application/json" \
-d '{"documents":[{"id":"f1","fields":[{"name":"title","type":"text","value":"Up in the Air"}]}]}'
curl -X POST https://api.altengine.net/v1/search/catalog/indexes/films/search \
-H "Authorization: Bearer $ALTENGINE_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"title:air"}'Errors
Errors use standard HTTP status codes and a consistent JSON body:
{
"error": {
"code": "NOT_FOUND",
"message": "document not found"
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | INVALID_ARGUMENT | Malformed request, invalid JSON, or a value outside allowed limits. |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired credentials. |
| 403 | PERMISSION_DENIED | The key or token lacks the required grant for this operation. |
| 404 | NOT_FOUND | The index, document, or instance does not exist. |
| 500 | INTERNAL | An unexpected server error. |