Skip to Content
ReferenceWorker API

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

EnvironmentTypical base
Shared production poolhttps://services.geobase.app/worker
Shared staging poolhttps://services.staging.geobase.app/worker
Local workerhttp://127.0.0.1:3333 (or STUDIO_LOCAL_WORKER_URL)

Studio resolves the base via STUDIO_LOCAL_WORKER_URLSTUDIO_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 with projectRef (query on GET/DELETE; projectTarget.projectRef on POST bodies).
  • Local worker: often no Kong; use project service role as in examples below.

Endpoints (shape)

MethodPathPurpose
GET/docOpenAPI
POST/jobs/{taskName}Enqueue
GET/jobs/{taskName}List (?projectRef= on shared pool)
GET/jobs/{taskName}/latestLatest 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.

Last updated on