Docs

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.net

The 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-secret

Create 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

API-key grant levels and the operations each permits
GrantPermits
readSearch and read documents; list indexes and read schema; mint subscribe-only channel tokens.
writeEverything in read, plus put documents, publish messages, and mint publish-capable channel tokens.
fullEverything 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"
  }
}
Error status codes and their meaning
StatusCodeMeaning
400INVALID_ARGUMENTMalformed request, invalid JSON, or a value outside allowed limits.
401UNAUTHENTICATEDMissing, malformed, or expired credentials.
403PERMISSION_DENIEDThe key or token lacks the required grant for this operation.
404NOT_FOUNDThe index, document, or instance does not exist.
500INTERNALAn unexpected server error.

Reference