Skip to content

AcuGIS CLI coverage

This mapping is based on acugis/services/qgis_publish.py, qgis_publish_client.py, and the CLI session/auth helpers. It describes calls the code actually makes, not endpoint URLs that it merely prints.

The CLI uses SERVICE_BASE=/qgis-publish-service, independent of a server's custom BASE_PATH. It creates a requests.Session, sends Accept: application/json, and authenticates with either the saved Central acugis_session cookie or Authorization: Bearer <token>. Password login itself is a Central workflow (POST /login, then GET /api/me); those are not QGIS Publish Service endpoints.

Resolution shared by map commands

When a command accepts MAP, resolve_catalog_map() uses this fallback chain:

  1. GET /api/catalog on Central; filter the maps bucket to type=map.
  2. If no match, GET /qgis-publish-service/api/discovery.
  3. If still unresolved, GET /qgis-publish-service/projects/{MAP}.
  4. If direct ID lookup fails, GET /qgis-publish-service/projects and match name or id case-insensitively.

The chain stops when it finds a unique match. Therefore the calls below are possible calls, not a promise that every invocation makes every call.

Implemented commands

acugis maps list

Calls:

  1. GET /api/catalog (Central, not this service).
  2. Only when its map list is empty or invalid, GET /qgis-publish-service/api/discovery.

It does not call GET /projects. Viewer URLs are taken from catalog/discovery and may be synthesized locally only for display.

acugis maps open MAP

Runs the shared resolution chain, then constructs/opens the catalog viewer URL (or local fallback /qgis-publish-service/ui/viewer.html?id=...). It makes no viewer, WMS, or project-detail request after resolution.

acugis maps info MAP

Runs the shared resolution chain, then attempts all of:

  1. GET /qgis-publish-service/projects/{id}
  2. GET /qgis-publish-service/projects
  3. GET /qgis-publish-service/api/projects/{id}/metadata
  4. GET /qgis-publish-service/api/projects/{id}/layers
  5. GET /qgis-publish-service/api/projects/{id}/reports
  6. GET /qgis-publish-service/projects/{id}/versions

Most enrichment failures are swallowed and represented as missing sections. The displayed WMS/WFS/capabilities URLs are constructed, not requested. In cache/XYZ mode it constructs qcarta WMS URLs from qgs_path.

acugis maps layers MAP

Runs the shared resolution chain, then:

  1. GET /qgis-publish-service/projects/{id} (for title/layer-tree enrichment)
  2. GET /qgis-publish-service/api/projects/{id}/layers

Failure of the layers call becomes a friendly CLI error.

acugis maps versions MAP

Runs the shared resolution chain, then:

  1. GET /qgis-publish-service/projects/{id}
  2. GET /qgis-publish-service/projects/{id}/versions

acugis maps publish SOURCE

Create mode:

  1. POST /qgis-publish-service/projects/upload as multipart field file.

Update mode (--update MAP):

  1. Runs the shared resolution chain.
  2. POST /qgis-publish-service/projects/{id}/update as multipart field file.

Optional metadata composite (--title and/or --description):

  1. GET /qgis-publish-service/api/projects/{id}/metadata to preserve existing fields.
  2. The current implementation calls the same GET again inside upsert_project_metadata().
  3. PUT /qgis-publish-service/api/projects/{id}/metadata with merged JSON.

Thus publish is not one-to-one with upload: it may be an upload/update plus two metadata reads and one metadata write. --open only opens a locally constructed viewer URL after success; it makes no extra service call. Accepted local source files are .zip, .qgs, and .qgz; directories are rejected.

acugis maps delete

Unimplemented. It invokes the generic not_implemented() helper and makes no HTTP request. In particular, it does not call DELETE /qgis-publish-service/projects/{id}.

QGIS endpoints used by at least one CLI map command

There are 10 unique QGIS Publish Service method/path patterns actually called:

  1. GET /api/discovery
  2. GET /projects
  3. GET /projects/{id}
  4. GET /api/projects/{id}/metadata
  5. PUT /api/projects/{id}/metadata
  6. GET /api/projects/{id}/layers
  7. GET /api/projects/{id}/reports
  8. GET /projects/{id}/versions
  9. POST /projects/upload
  10. POST /projects/{id}/update

Paths above are shown relative to /qgis-publish-service. Central GET /api/catalog is an additional non-service dependency.

Registered service endpoints with no matching CLI command

The map CLI does not call the following API/protocol registrations. This is an explicit list; aliases and method variants remain separate.

Project lifecycle/configuration:

  • POST /api/resource-sync
  • DELETE /projects/{id}
  • GET /projects/{id}/download
  • GET /projects/{id}/versions/{version}/download
  • POST /projects/{id}/versions/{version}/restore
  • POST /projects/generate
  • GET /api/projects/{id}/forms
  • PUT /api/projects/{id}/reports
  • DELETE /api/projects/{id}/metadata
  • GET /api/projects/{id}/relation-reference
  • GET /api/projects/{id}/lookup
  • POST /projects/{id}/render-mode
  • POST /projects/{id}/legend-settings
  • POST /projects/{id}/basemap-settings
  • POST /projects/{id}/seed
  • POST /api/projects/{id}/runtime/reload

Viewer/expression/analysis:

  • GET /api/auth/context
  • POST /api/qgis/evaluate-expression
  • GET /api/projects/{id}/pivot-data
  • GET /api/projects/{id}/outliers-data
  • GET /api/projects/{id}/hotspots-data
  • GET /qgis/{projectId}
  • HEAD /qgis/{projectId}
  • GET /api/feature-relations
  • GET /api/feature-relations.php

Feature data:

  • POST /api/projects/{id}/features/create
  • POST /api/projects/{id}/features/update
  • POST /api/projects/{id}/features/delete
  • POST /api/projects/{id}/attachments
  • GET /project-data/{id}/{path...}
  • HEAD /project-data/{id}/{path...}

PostgreSQL services and basemaps:

  • GET /pgservice
  • POST /pgservice
  • POST /pgservice/test
  • DELETE /pgservice/{name}
  • GET /basemaps
  • POST /basemaps
  • DELETE /basemaps/{id}

Browser maps and GeoVault browser proxy:

  • GET /api/browser-maps
  • POST /api/browser-maps
  • GET /api/browser-maps/{id}
  • PUT /api/browser-maps/{id}
  • DELETE /api/browser-maps/{id}
  • POST /api/browser-maps/{id}/duplicate
  • POST /api/browser-maps/{id}/thumbnail
  • GET /api/browser-maps/datasets/{datasetId}/resolve
  • GET /api/map-builder/geovault/{path...}

Ingest:

  • GET /api/ingest/sessions
  • POST /api/ingest/sessions
  • GET /api/ingest/sessions/{id}
  • DELETE /api/ingest/sessions/{id}
  • POST /api/ingest/sessions/{id}/sources
  • GET /api/ingest/sessions/{id}/sources/{sourceId}
  • PATCH /api/ingest/sessions/{id}/sources/{sourceId}
  • DELETE /api/ingest/sessions/{id}/sources/{sourceId}
  • GET /api/ingest/sessions/{id}/sources/{sourceId}/preview
  • GET /api/ingest/sessions/{id}/sources/{sourceId}/file
  • POST /api/ingest/sessions/{id}/sources/{sourceId}/actions/{action}
  • POST /api/ingest/postgis/connect
  • POST /api/ingest/postgis/discover

Import/integration:

  • POST /api/geosync-publish
  • POST /api/quick-import
  • GET /api/quick-import/postgis-service/{path...}
  • POST /api/quick-import/postgis-service/{path...}
  • GET /api/quick-import/geovault/{path...}
  • POST /api/quick-import/geovault/{path...}
  • POST /api/operational/import
  • GET /api/operational/datasets
  • GET /api/operational/datasets/{id}
  • POST /api/operational/datasets/{id}/rewrite-project (server endpoint itself is disabled with 410)

External prefixes and bundled qcarta:

  • {BASE}/cache/{path...} and {BASE}/routing/{path...}
  • qcarta GET /api/wms, GET /mproxy/service, GET /api/tiles/{z}/{x}/{y}.png, /api/wmts, POST /api/seed, GET /api/seed/status, POST /api/prewarm, /api/health, /health, /api/metrics, and POST /admin/cache/purge

Browser/static registrations also have no CLI command: both bootstrap JavaScript paths, /maps/view/{id}, /seed.html, /shared/ui/, /ui/, and root/static fallbacks. The CLI may open a viewer URL, but that is browser navigation rather than an HTTP call made by the CLI client.

Coverage counts

  • CLI map commands: 7 registered — 6 implemented and 1 (maps delete) explicitly unimplemented.
  • Unique QGIS Publish Service API patterns actually called: 10.
  • Additional Central API dependency: 1 (GET /api/catalog); Central login/session calls are authentication infrastructure, not map-command coverage.
  • The server source has 91 mux.Handle* registrations (including mutually exclusive base-path/static branches) plus 11 bundled qcarta registrations. The CLI therefore does not provide one-to-one endpoint coverage and should not be described as doing so.