Worker API
Use this page with Global Geobase context.
What this service is
HTTP API for background jobs (imports, embeddings, archives). OpenAPI lives at {worker_base}/doc.
This is not the GeoEmbeddings RPC API (PostgREST search). Worker jobs write embeddings and other data; RPC queries them afterward.
Base URL
| Environment | Typical base |
|---|---|
| Shared production pool | https://services.geobase.app/worker |
| Shared staging pool | https://services.staging.geobase.app/worker |
| Local worker | http://127.0.0.1:3333 (or STUDIO_LOCAL_WORKER_URL) |
Studio resolves the base via STUDIO_LOCAL_WORKER_URL → STUDIO_SHARED_WORKER_URL → env defaults (local in development, otherwise the shared pool). Per-project {origin}/worker is retired for Studio on staging/shared pools; CLI output may still show {origin}/worker/… for historical deep links — prefer the shared base when using org services.
Auth
- Server-side only — never call job create/cancel from the browser with a service role key.
- Shared pool: organization Services API key (
apikey+Authorization: Bearer …) and scope every call to a project withprojectRef(query on GET/DELETE;projectTarget.projectRefon POST bodies). - Local worker: often no Kong; use project service role as in examples below.
Endpoints (shape)
| Method | Path | Purpose |
|---|---|---|
GET | /doc | OpenAPI |
POST | /jobs/{taskName} | Enqueue |
GET | /jobs/{taskName} | List (?projectRef= on shared pool) |
GET | /jobs/{taskName}/latest | Latest job |
GET | /jobs/{taskName}/{job_id} | Status |
DELETE | /jobs/{taskName}/{job_id} | Cancel |
Task names: see Worker jobs.
Minimal example
# Local or project-scoped worker
curl -sS "${WORKER_BASE_URL}/doc"
curl -sS -X POST "${WORKER_BASE_URL}/jobs/createGeoEmbeddings" \
-H "apikey: ${GEOBASE_SERVICE_ROLE_KEY}" \
-H "Authorization: Bearer ${GEOBASE_SERVICE_ROLE_KEY}" \
-H "Content-Type: application/json" \
-d '{
"geotiffPath": "https://example.com/scene.tif",
"tableName": "my_embeddings",
"uploadArtifactsToStorage": true
}'Studio also proxies jobs as POST /api/projects/{ref}/jobs/{taskName} (session auth). That control-plane route is not the worker OpenAPI host.
Human checkpoint
Confirm the task exists under {WORKER_BASE_URL}/doc and that auth matches shared-pool vs local.