honua-admin › Clients¶
The admin SDK ships sync and async clients with parity to the data-plane
SDK: pick HonuaAdminClient for scripts
and CLIs, and
AsyncHonuaAdminClient for async
services. Both clients share the data-plane configuration model
(auth, retries, timeouts, with_options(...)); see the
honua-sdk core client model for the conceptual
overview that applies to both packages.
from honua_admin import HonuaAdminClient
with HonuaAdminClient("https://admin.your-honua-server.com", api_key="...") as admin:
services = admin.list_services()
Upload a file and update a service's access policy through either client:
from honua_admin import BackgroundImportResponse, HonuaAdminClient
with HonuaAdminClient("https://admin.your-honua-server.com", api_key="...") as admin:
with open("points.geojson", "rb") as source:
result = admin.upload_file(source, filename="points.geojson", table_name="points")
if isinstance(result, BackgroundImportResponse):
print(result.job_id, result.status_url)
elif result.success:
print(result.schema, result.physical_table_name, result.feature_count)
else:
print(result.error_code, result.error_message)
settings = admin.update_access_policy("default", allow_anonymous=True)
For AsyncHonuaAdminClient, await both calls. upload_file sends multipart
file and TableName; it accepts bytes or an open binary stream. It buffers
all remaining bytes in memory from the stream's current position, leaves the
stream open at EOF, and rejects empty/exhausted input. For a second call,
rewind the stream explicitly or pass bytes. Use files that fit in available
memory. Let httpx generate the multipart Content-Type and boundary; do not
set Content-Type in request headers or an external client's default headers.
content_type sets only the file part's media type.
Uploads use the existing POST retry policy: one attempt by default, with
replayable buffered content if a caller explicitly enables POST retries on
a supplied transport or external httpx client. Supply an idempotency_key
when opting into POST retries. Both operations accept timeout,
extra_headers, and idempotency_key per call and preserve configured base
paths and authentication.
update_access_policy sends only supplied fields. None preserves the
server value; False disables the corresponding anonymous permission, and
[] clears a role restriction. The response contains refreshed service
settings, including the resolved access policy.
Folders¶
Both clients expose the server's one-level Folder catalog. Access is managed
per Service. service_name remains the logical Admin identity; use protocol
links from discovery when connecting to a Service.
| Method | Result |
|---|---|
list_folders() |
(list[Folder], snapshot_etag) including empty Folders |
create_folder(name, if_match=etag) |
(Folder, new_etag) |
update_folder(id, if_match=etag, ...) |
(Folder, new_etag) |
delete_folder(id, if_match=etag) |
New ETag; the Folder must be empty |
move_service(name, folder_id, if_match=etag) |
New ETag; None selects Root |
from honua_admin import HonuaAdminClient
with HonuaAdminClient("https://admin.your-honua-server.com", api_key="...") as admin:
folders, etag = admin.list_folders()
if etag is None:
raise RuntimeError("The catalog response did not include an ETag")
folder, etag = admin.create_folder("Survey", title="Field survey", if_match=etag)
if etag is None:
raise RuntimeError("The mutation response did not include an ETag")
etag = admin.move_service("parcels", folder.metadata.id, if_match=etag)
Await the same methods on AsyncHonuaAdminClient. The ETag belongs to the
whole catalog, so another catalog edit can make it stale. A stale write raises
HonuaHttpError with status 412: refresh and review the intended change before
retrying. Conflicts, non-empty deletion and authorization failures retain the
server's HTTP error status and details. Where approval is required, these calls
surface that requirement; they do not approve the mutation.
Omitting namespace keeps the operation unscoped. Supplying it selects the
namespace operation in the Environment the client is connected to. Folder moves and
path renames retain the old public paths according to the server's reservation
rules. update_folder(..., title=None) clears display text; omitting title
preserves it. Changing name changes the Folder path.
Publishing accepts PublishLayerRequest.folder_id: omit it to preserve the
server's default or existing membership, supply None to select Root, or pass
the Folder ID. public_name selects the immutable public leaf for a new
Service. It is separate from the logical service_name and display title.
Existing calls without these fields keep their original request JSON.
Raw OpenAPI client (honua_admin.raw)¶
Every operation in the pinned admin-api.json OpenAPI specification is
reachable through honua_admin.raw (RawAdminClient / AsyncRawAdminClient)
or the .raw property on either typed client.
from honua_admin import HonuaAdminClient
from honua_admin.raw import RawRequest
with HonuaAdminClient("https://admin.your-honua-server.com", api_key="...") as admin:
result = admin.raw.call("getConnection", RawRequest(path={"id": "conn-1"}))
print(result.status_code, result.data)
ADMIN_OPERATIONS exposes the immutable catalog of generated
AdminOperationDescriptor entries, and AdminOperationId provides a strict
Literal union of every pinned operationId.
See also: honua-sdk Clients for the data-plane
counterpart that shares the same configuration model, and
Core client model for cross-package with_options(...)
semantics.
honua_admin.HonuaAdminClient
¶
Synchronous client for the Honua Admin (control-plane) API.
Methods map 1:1 to
admin REST endpoints (services, connections, layers, styles, config)
and return typed model objects. Use :attr:raw for generated access
to every operation in admin-api.json.
Authentication is configured at construction with at most one of
api_key, bearer_token, or auth_provider (mutually
exclusive). bearer_token= is deprecated (removal in 0.2.x);
prefer auth_provider=StaticAuthProvider({"Authorization": f"Bearer
{token}"}). When client is supplied as a pre-built
:class:httpx.Client, no auth kwargs may be passed — configure
them on the client instead.
Retries: only idempotent methods (GET/HEAD/PUT/DELETE/OPTIONS) on
transient statuses (429/502/503/504) are retried by default. Opt
POST in by configuring retry_methods on the underlying retry
transport; mutating helpers (create_connection, publish_layer)
then auto-generate Idempotency-Key headers.
Use as a context manager so the underlying transport closes deterministically::
with HonuaAdminClient("https://example.com", api_key="...") as admin:
services = admin.list_services()
Per-call overrides (timeout, extra_headers,
idempotency_key) are exposed on every method; use
:meth:with_options for sticky per-clone overrides (shared
transport unless base_url is supplied).
All HTTP failures surface as :class:HonuaHttpError (or one of its
status-specific subclasses such as :class:HonuaAuthError /
:class:HonuaRateLimitError); transport-level failures surface as
:class:HonuaTransportError (and its subclass
:class:HonuaTimeoutError).
See also: :class:honua_sdk.HonuaClient and
docs/core-client.md.
raw
property
¶
Return a raw OpenAPI client bound to this admin client's transport.
__init__(base_url, *, timeout=30.0, api_key=None, bearer_token=None, auth_provider=None, follow_redirects=False, client=None, transport=None, max_retries=3, allow_insecure_http=False)
¶
Construct an admin client bound to a single Honua deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url
|
str
|
Server base URL (scheme + host + optional path prefix). Trailing slashes are normalized. |
required |
timeout
|
float
|
Request timeout in seconds applied to every call. |
30.0
|
api_key
|
str | None
|
Optional |
None
|
bearer_token
|
str | None
|
Optional |
None
|
auth_provider
|
AuthProvider | None
|
Pluggable provider that yields request-time
auth headers. Mutually exclusive with |
None
|
follow_redirects
|
bool
|
Whether the underlying
:class: |
False
|
client
|
Client | None
|
A caller-supplied :class: |
None
|
transport
|
BaseTransport | None
|
A caller-supplied
:class: |
None
|
max_retries
|
int
|
Maximum number of retry attempts on transient
HTTP statuses (429/502/503/504). |
3
|
allow_insecure_http
|
bool
|
Allow credentials over a plain |
False
|
Raises:
| Type | Description |
|---|---|
ValueError
|
|
close()
¶
Release underlying HTTP resources if this instance owns the client.
When constructed with an externally supplied
:class:httpx.Client, ownership stays with the caller and
this method is a no-op.
with_options(*, timeout=None, max_retries=None, base_url=None)
¶
Return a clone with overridden options.
When only timeout and/or max_retries are supplied, the
returned client reuses the original's :class:httpx.Client
and its connection pool — only the per-request timeout and
(optionally) the per-request retry budget are overridden. In this
transport-sharing mode the clone does not own the underlying
client; calling :meth:close on the clone is a no-op. Only the
original is responsible for closing the transport.
Passing base_url creates an independent client; the
transport is NOT shared. Because the underlying
:class:httpx.Client binds its base_url (and
authority-bound timeouts, event hooks, and connection-pool keys)
at construction time, swapping the base URL on a shared client
would silently target the wrong host for any code path that
relies on those bindings. To avoid that footgun, supplying
base_url builds a fresh :class:httpx.Client for the
clone and the clone owns it — you must clone.close() (or use with) independently of the
original.
The auth provider, if any, is reused (not duplicated) so token state is shared across the original and the clone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float | None
|
When set, overrides the per-request timeout. Smaller
|
None
|
max_retries
|
int | None
|
When set, overrides the retry budget. |
None
|
base_url
|
str | None
|
When set, the returned clone is fully independent
(owns its own :class: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
An |
HonuaAdminClient
|
class: |
HonuaAdminClient
|
the override timeout is greater than or equal to the |
|
HonuaAdminClient
|
parent's configured timeout, independently-owned when |
|
HonuaAdminClient
|
|
|
HonuaAdminClient
|
the parent's configured timeout. |
copy(*, timeout=None, max_retries=None, base_url=None)
¶
Alias for :meth:with_options.
Provided for parity with the stripe-python convention. The
semantics are identical to :meth:with_options; see that method
for the full contract.
upload_file(file, *, filename, table_name, content_type='application/octet-stream', timeout=None, extra_headers=None, idempotency_key=None)
¶
Upload a geospatial file using multipart file and TableName.
file is bytes or a caller-owned binary stream. Streams are read
from their current position to EOF once, without seeking or closing;
the remaining content is buffered in memory before sending. Empty or
exhausted input raises ValueError before any HTTP request.
POST is not retried by default. If the caller opts POST into a retry
transport, the buffered bytes are replayable on every attempt. Supply
idempotency_key when using an external client with POST retries.
Do not supply a multipart Content-Type header: httpx generates it,
including the boundary. content_type applies to the file part.
Returns a completed :class:ImportResult for HTTP 200, or a
:class:BackgroundImportResponse for HTTP 202 when the server queues
a large file. A completed result can have success=False; inspect
its error and validation fields. HTTP/transport errors follow the
same HonuaHttpError / HonuaTransportError policy as other calls.
list_folders(*, namespace=None, timeout=None, extra_headers=None)
¶
List catalog Folders with the snapshot ETag used by mutations.
create_folder(name, *, if_match, title=None, namespace=None, timeout=None, extra_headers=None)
¶
Create a Folder against the supplied catalog snapshot ETag.
update_folder(folder_id, *, if_match, name=None, title=Ellipsis, namespace=None, timeout=None, extra_headers=None)
¶
Rename a Folder or update its title; None clears a supplied title.
delete_folder(folder_id, *, if_match, namespace=None, timeout=None, extra_headers=None)
¶
Delete an empty Folder and return the resulting catalog ETag.
move_service(service_name, folder_id, *, if_match, namespace=None, timeout=None, extra_headers=None)
¶
Move a logical Service to a Folder or to Root when folder_id is None.
list_services(*, timeout=None, extra_headers=None)
¶
Read every page of the admin service list.
list_services_page(query=None, *, timeout=None, extra_headers=None)
¶
Return one page of admin services and the count of every match.
get_service_settings(name, *, timeout=None, extra_headers=None)
¶
Fetch the resolved settings for a single service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Service name as advertised by the catalog. URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
ServiceSettingsResponse
|
class: |
ServiceSettingsResponse
|
availability and per-protocol configuration. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
update_protocols(name, protocols, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Replace the enabled-protocol list for a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Service name; URL-encoded. |
required |
protocols
|
list[str]
|
Desired ordered list of protocol identifiers. |
required |
Returns:
| Type | Description |
|---|---|
ServiceSettingsResponse
|
The refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the update. |
HonuaTransportError
|
The request failed at the transport layer. |
update_access_policy(name, *, allow_anonymous=None, allow_anonymous_write=None, allowed_roles=None, allowed_write_roles=None, timeout=None, extra_headers=None, idempotency_key=None)
¶
PUT service access policy and return refreshed service settings.
name is encoded as one URL path segment. Omitted/None fields
preserve their server values; False disables anonymous access and
an empty role list clears that restriction. For example,
update_access_policy("default", allow_anonymous=True) sends
exactly {"allowAnonymous": true}.
Per-request timeout, header and idempotency overrides use the same conventions and HTTP/transport error types as other admin methods.
update_mapserver_settings(name, *, max_image_width=None, max_image_height=None, default_image_width=None, default_image_height=None, default_dpi=None, default_format=None, default_transparent=None, max_features_per_layer=None, extra_settings=None, timeout=None, extra_headers=None, idempotency_key=None)
¶
Patch the MapServer-specific settings for a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Service name; URL-encoded. |
required |
max_image_width
|
int | None
|
Maximum allowed image width in pixels. |
None
|
max_image_height
|
int | None
|
Maximum allowed image height in pixels. |
None
|
default_image_width
|
int | None
|
Default image width applied when callers omit one. |
None
|
default_image_height
|
int | None
|
Default image height applied when callers omit one. |
None
|
default_dpi
|
int | None
|
Default DPI used when callers omit one. |
None
|
default_format
|
str | None
|
Default image format (e.g. |
None
|
default_transparent
|
bool | None
|
Default transparency setting for rendered tiles. |
None
|
max_features_per_layer
|
int | None
|
Server-side cap on features returned per layer. |
None
|
extra_settings
|
Mapping[str, Any] | None
|
Escape hatch for additional snake-case settings that
aren't represented as explicit kwargs. Keys are converted to
camelCase before being sent. Only fields with non- |
None
|
Returns:
| Type | Description |
|---|---|
ServiceSettingsResponse
|
The refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the update. |
HonuaTransportError
|
The request failed at the transport layer. |
get_version(*, timeout=None, extra_headers=None)
¶
Return the server's reported admin API version.
Returns:
| Name | Type | Description |
|---|---|---|
An |
AdminVersionResponse
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
get_capabilities(*, timeout=None, extra_headers=None)
¶
Return the server's advertised admin capabilities and compat block.
Returns:
| Name | Type | Description |
|---|---|---|
An |
AdminCapabilitiesResponse
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
get_capability_flags(*, timeout=None, extra_headers=None)
¶
Return coarse feature flags from the admin compatibility contract.
When the server does not expose a compatibility block (older
deployments), the returned flags are all False.
Returns:
| Name | Type | Description |
|---|---|---|
An |
AdminCompatibilityFeatureFlags
|
class: |
AdminCompatibilityFeatureFlags
|
optional admin surfaces the server supports. |
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The underlying capabilities fetch failed with a non-success status. |
HonuaTransportError
|
The capabilities fetch failed at the transport layer. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:get_capabilities.
check_compatibility(*, timeout=None, extra_headers=None)
¶
Evaluate whether the connected server satisfies the admin SDK baseline.
Returns:
| Name | Type | Description |
|---|---|---|
An |
AdminCompatibilityCheckResult
|
class: |
AdminCompatibilityCheckResult
|
the server's compatibility block meets |
|
AdminCompatibilityCheckResult
|
attr: |
|
AdminCompatibilityCheckResult
|
specific gaps. |
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The underlying capabilities fetch failed with a non-success status. |
HonuaTransportError
|
The capabilities fetch failed at the transport layer. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:get_capabilities.
scan_migration_source(request, *, export_json=False, timeout=None, extra_headers=None, idempotency_key=None)
¶
POST /api/v1/admin/import/scan
validate_toolbox_translation(manifest, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
POST /api/v1/admin/import/toolbox/translation/validate
Validate an SDK-translated source toolbox manifest against the server's canonical geoprocessing process catalog, and return the server-authoritative per-tool classification.
The server owns the round-trip proof: it never parses toolbox sources
and never emulates the scripting API. The SDK proposes a mapping; the catalog
decides whether that mapping is translated,
partially-translated, or unsupported, and returns the specific
reasons a tool cannot be fully translated.
A verdict derived from this call may be presented as server-attested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manifest
|
ToolboxTranslationManifest
|
The translated toolbox manifest to validate. |
required |
Returns:
| Type | Description |
|---|---|
ToolboxTranslationReport
|
The server's :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the manifest (for example an
unsupported |
HonuaTransportError
|
The request failed at the transport layer. |
list_connections(*, timeout=None, extra_headers=None)
¶
List every secure datasource connection registered on the server.
Returns:
| Name | Type | Description |
|---|---|---|
Typed |
list[SecureConnectionSummary]
|
class: |
list[SecureConnectionSummary]
|
the server returns a non-list payload. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
get_connection(id, *, timeout=None, extra_headers=None)
¶
Fetch detailed information for a single secure connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Connection identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
SecureConnectionDetail
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
create_connection(request, *, idempotency_key=None, timeout=None, extra_headers=None)
¶
Create a new secure datasource connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateSecureConnectionRequest
|
Connection definition (DSN, credentials, options). |
required |
idempotency_key
|
str | None
|
Stripe-style |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
SecureConnectionSummary
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the create. |
HonuaTransportError
|
The request failed at the transport layer. |
test_draft_connection(request, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Verify a draft connection definition without persisting it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateSecureConnectionRequest
|
The same payload that would be sent to
:meth: |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
ConnectionTestResult
|
class: |
ConnectionTestResult
|
in the result payload, not as an exception. |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server returned a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
update_connection(id, request, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Replace mutable fields on an existing secure connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Connection identifier; URL-encoded. |
required |
request
|
UpdateSecureConnectionRequest
|
Patch payload describing the new state. |
required |
Returns:
| Type | Description |
|---|---|
SecureConnectionSummary
|
A refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the update. |
HonuaTransportError
|
The request failed at the transport layer. |
test_connection(id, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Re-run the server-side connection probe for a stored connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Connection identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
ConnectionTestResult
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server itself rejected the request. |
HonuaTransportError
|
The request failed at the transport layer. |
delete_connection(id, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Delete a stored secure connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Connection identifier; URL-encoded. |
required |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the delete. |
HonuaTransportError
|
The request failed at the transport layer. |
validate_encryption(*, timeout=None, extra_headers=None, idempotency_key=None)
¶
Verify that the server can decrypt every stored credential.
Returns:
| Name | Type | Description |
|---|---|---|
An |
EncryptionValidationResult
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
rotate_encryption_key(*, timeout=None, extra_headers=None, idempotency_key=None)
¶
Rotate the server's connection-encryption key.
Returns:
| Name | Type | Description |
|---|---|---|
A |
KeyRotationResult
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the rotation request. |
HonuaTransportError
|
The request failed at the transport layer. |
list_layers(conn_id, service_name=None, *, timeout=None, extra_headers=None)
¶
Read every page of layers published on a connection.
list_layers_page(conn_id, query=None, *, timeout=None, extra_headers=None)
¶
Return one page of layers published on a connection.
publish_layer(conn_id, request, *, idempotency_key=None, timeout=None, extra_headers=None)
¶
Publish a new layer derived from a stored connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Connection identifier; URL-encoded. |
required |
request
|
PublishLayerRequest
|
Layer-publication payload. |
required |
idempotency_key
|
str | None
|
Stripe-style |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
PublishedLayerSummary
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the publish request. |
HonuaTransportError
|
The request failed at the transport layer. |
set_layer_enabled(conn_id, layer_id, enabled, service_name=None, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Toggle whether a single published layer is enabled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Connection identifier; URL-encoded. |
required |
layer_id
|
int
|
Numeric layer identifier. |
required |
enabled
|
bool
|
Desired |
required |
service_name
|
str | None
|
Optional service-scoped toggle. |
None
|
Returns:
| Type | Description |
|---|---|
PublishedLayerSummary
|
The refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the toggle. |
HonuaTransportError
|
The request failed at the transport layer. |
set_service_layers_enabled(conn_id, enabled, service_name=None, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Toggle every layer on a connection (optionally per service) in bulk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Connection identifier; URL-encoded. |
required |
enabled
|
bool
|
Desired |
required |
service_name
|
str | None
|
Optional per-service restriction. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Refreshed |
list[PublishedLayerSummary]
|
class: |
list[PublishedLayerSummary]
|
affected layer; empty when the server returns a non-list |
|
list[PublishedLayerSummary]
|
payload. |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the bulk toggle. |
HonuaTransportError
|
The request failed at the transport layer. |
discover_tables(conn_id, *, timeout=None, extra_headers=None)
¶
Ask the server which tables are visible through a connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Connection identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
TableDiscoveryResponse
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
list_styles(*, timeout=None, extra_headers=None)
¶
List the styles published over OGC API - Styles (GET /ogc/styles).
Returns:
| Name | Type | Description |
|---|---|---|
An |
OgcStylesList
|
class: |
OgcStylesList
|
optional default style and landing links. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
get_stylesheet(style_id, *, encoding=_DEFAULT_STYLE_ENCODING, timeout=None, extra_headers=None)
¶
Fetch a stylesheet by style_id (GET /ogc/styles/{styleId}).
The encoding is selected by Accept content negotiation:
mapbox-style (MapLibre/Mapbox JSON, the default), sld-1.0,
or sld-1.1 (derived on demand by the server).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style_id
|
str
|
Stable style identifier. |
required |
encoding
|
StyleEncoding
|
Desired stylesheet encoding (see :data: |
DEFAULT_STYLE_ENCODING
|
Returns:
| Name | Type | Description |
|---|---|---|
An |
OgcStylesheet
|
class: |
OgcStylesheet
|
|
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status (e.g. 404 unknown style, 406 unsupported encoding). |
HonuaTransportError
|
The request failed at the transport layer. |
get_style_metadata(style_id, *, timeout=None, extra_headers=None)
¶
Fetch style metadata (GET /ogc/styles/{styleId}/metadata).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style_id
|
str
|
Stable style identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
An |
OgcStyleMetadata
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
update_style(style_id, style, *, strict=False, timeout=None, extra_headers=None, idempotency_key=None)
¶
Replace an existing style's MapLibre stylesheet (PUT /ogc/styles/{styleId}).
Phase 1 manage-styles accepts only a MapLibre/Mapbox style
document; the server validates and stores it against the existing
style. Standalone style creation/deletion is not yet supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style_id
|
str
|
Stable style identifier (must already exist). |
required |
style
|
Mapping[str, Any]
|
The MapLibre/Mapbox stylesheet document. |
required |
strict
|
bool
|
When |
False
|
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the update (e.g. 400 invalid style, 404 unknown style, 415 unsupported media type). |
HonuaTransportError
|
The request failed at the transport layer. |
get_layer_style(layer_id, *, timeout=None, extra_headers=None)
¶
Fetch the stored renderer / style document for a layer.
.. deprecated::
This layerId-keyed path is a back-compat alias (ADR-0048).
Prefer the styleId-keyed :meth:get_stylesheet /
:meth:get_style_metadata over OGC API - Styles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer_id
|
int
|
Numeric layer identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
LayerStyleResponse
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
update_layer_style(layer_id, request, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Replace the stored renderer / style document for a layer.
.. deprecated::
This layerId-keyed path is a back-compat alias (ADR-0048).
Prefer the styleId-keyed :meth:update_style over OGC
API - Styles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer_id
|
int
|
Numeric layer identifier. |
required |
request
|
LayerStyleUpdateRequest
|
The new renderer payload. |
required |
Returns:
| Type | Description |
|---|---|
LayerStyleResponse
|
A refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the style update. |
HonuaTransportError
|
The request failed at the transport layer. |
list_proposals(*, status=None, kind=None, requested_by=None, timeout=None, extra_headers=None)
¶
List guardrail-routed operation proposals.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status
|
str | None
|
Case-insensitive lifecycle filter ( |
None
|
kind
|
str | None
|
Case-insensitive operation-class filter; the server ignores values it cannot parse. |
None
|
requested_by
|
str | None
|
Case-insensitive match on the requesting principal. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Typed |
list[OperationProposalSummary]
|
class: |
list[OperationProposalSummary]
|
server returns no |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status
( |
HonuaTransportError
|
The request failed at the transport layer. |
get_proposal(id, *, timeout=None, extra_headers=None)
¶
Fetch one operation proposal with its plan and resolution state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Opaque proposal identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
An |
OperationProposalDetail
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status
( |
HonuaTransportError
|
The request failed at the transport layer. |
approve_proposal(id, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Approve an operation proposal and apply it through the gateway.
The server enforces separation of duties: the principal that requested a proposal cannot approve it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Opaque proposal identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
The |
OperationProposalDetail
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server refused the approval ( |
HonuaTransportError
|
The request failed at the transport layer. |
reject_proposal(id, reason, *, timeout=None, extra_headers=None, idempotency_key=None)
¶
Reject an operation proposal with a required reason.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Opaque proposal identifier; URL-encoded. |
required |
reason
|
str
|
Non-blank rejection reason recorded on the proposal. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
The |
OperationProposalDetail
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server refused the rejection ( |
HonuaTransportError
|
The request failed at the transport layer. |
get_config(*, timeout=None, extra_headers=None)
¶
Return the server's effective admin configuration block.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
The server-side admin config as a plain |
dict[str, Any]
|
|
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
honua_admin.AsyncHonuaAdminClient
¶
Asynchronous client for the Honua Admin (control-plane) API.
Async counterpart to :class:HonuaAdminClient: methods map 1:1 to
admin REST endpoints (services, connections, layers, styles, config)
and return typed model objects. Use :attr:raw for generated access
to every operation in admin-api.json.
Authentication is configured at construction with at most one of
api_key, bearer_token, or auth_provider (mutually
exclusive). bearer_token= is deprecated (removal in 0.2.x);
prefer auth_provider=StaticAuthProvider({"Authorization": f"Bearer
{token}"}). When client is supplied as a pre-built
:class:httpx.AsyncClient, no auth kwargs may be passed — configure
them on the client instead.
Retries: only idempotent methods (GET/HEAD/PUT/DELETE/OPTIONS) on
transient statuses (429/502/503/504) are retried by default. Opt
POST in by configuring retry_methods on the underlying retry
transport; mutating helpers (create_connection, publish_layer)
then auto-generate Idempotency-Key headers.
Use as an async context manager so the underlying transport closes deterministically::
async with AsyncHonuaAdminClient("https://example.com", api_key="...") as admin:
services = await admin.list_services()
Per-call overrides (timeout, extra_headers,
idempotency_key) are exposed on every method; use
:meth:with_options for sticky per-clone overrides (shared
transport unless base_url is supplied).
All HTTP failures surface as :class:HonuaHttpError (or one of its
status-specific subclasses such as :class:HonuaAuthError /
:class:HonuaRateLimitError); transport-level failures surface as
:class:HonuaTransportError (and its subclass
:class:HonuaTimeoutError).
See also: :class:honua_sdk.AsyncHonuaClient and
docs/core-client.md.
raw
property
¶
Return a raw OpenAPI client bound to this admin client's transport.
__init__(base_url, *, timeout=30.0, api_key=None, bearer_token=None, auth_provider=None, follow_redirects=False, client=None, transport=None, max_retries=3, allow_insecure_http=False)
¶
Construct an async admin client bound to a single Honua deployment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url
|
str
|
Server base URL (scheme + host + optional path prefix). Trailing slashes are normalized. |
required |
timeout
|
float
|
Request timeout in seconds applied to every call. |
30.0
|
api_key
|
str | None
|
Optional |
None
|
bearer_token
|
str | None
|
Optional |
None
|
auth_provider
|
AuthProvider | None
|
Pluggable provider that yields request-time
auth headers. Mutually exclusive with |
None
|
follow_redirects
|
bool
|
Whether the underlying
:class: |
False
|
client
|
AsyncClient | None
|
A caller-supplied :class: |
None
|
transport
|
AsyncBaseTransport | None
|
A caller-supplied
:class: |
None
|
max_retries
|
int
|
Maximum number of retry attempts on transient
HTTP statuses (429/502/503/504). |
3
|
allow_insecure_http
|
bool
|
Allow credentials over a plain |
False
|
Raises:
| Type | Description |
|---|---|
ValueError
|
|
close()
async
¶
Release underlying HTTP resources if this instance owns the client.
When constructed with an externally supplied
:class:httpx.AsyncClient, ownership stays with the caller and
this coroutine is a no-op.
with_options(*, timeout=None, max_retries=None, base_url=None)
¶
Return a clone with overridden options.
When only timeout and/or max_retries are supplied, the
returned client reuses the original's :class:httpx.AsyncClient
and its connection pool — only the per-request timeout and
(optionally) the per-request retry budget are overridden. In this
transport-sharing mode the clone does not own the underlying
client; awaiting :meth:close on the clone is a no-op. Only the
original is responsible for closing the transport.
Passing base_url creates an independent client; the
transport is NOT shared. Because the underlying
:class:httpx.AsyncClient binds its base_url (and
authority-bound timeouts, event hooks, and connection-pool keys)
at construction time, swapping the base URL on a shared client
would silently target the wrong host for any code path that
relies on those bindings. To avoid that footgun, supplying
base_url builds a fresh :class:httpx.AsyncClient for the
clone and the clone owns it — you must await
clone.close() (or use async with) independently of the
original.
The auth provider, if any, is reused (not duplicated) so token state is shared across the original and the clone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float | None
|
When set, overrides the per-request timeout. Smaller
|
None
|
max_retries
|
int | None
|
When set, overrides the retry budget. |
None
|
base_url
|
str | None
|
When set, the returned clone is fully independent
(owns its own :class: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
An |
AsyncHonuaAdminClient
|
class: |
AsyncHonuaAdminClient
|
the override timeout is greater than or equal to the |
|
AsyncHonuaAdminClient
|
parent's configured timeout, independently-owned when |
|
AsyncHonuaAdminClient
|
|
|
AsyncHonuaAdminClient
|
the parent's configured timeout. |
copy(*, timeout=None, max_retries=None, base_url=None)
¶
Alias for :meth:with_options.
Provided for parity with the stripe-python convention. The
semantics are identical to :meth:with_options; see that method
for the full contract.
upload_file(file, *, filename, table_name, content_type='application/octet-stream', timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Upload a geospatial file using multipart file and TableName.
file is bytes or a caller-owned binary stream. Streams are read
from their current position to EOF once, without seeking or closing;
the remaining content is buffered in memory before sending. Empty or
exhausted input raises ValueError before any HTTP request.
POST is not retried by default. If the caller opts POST into a retry
transport, the buffered bytes are replayable on every attempt. Supply
idempotency_key when using an external client with POST retries.
Do not supply a multipart Content-Type header: httpx generates it,
including the boundary. content_type applies to the file part.
Returns a completed :class:ImportResult for HTTP 200, or a
:class:BackgroundImportResponse for HTTP 202 when the server queues
a large file. A completed result can have success=False; inspect
its error and validation fields. HTTP/transport errors follow the
same HonuaHttpError / HonuaTransportError policy as other calls.
list_folders(*, namespace=None, timeout=None, extra_headers=None)
async
¶
List catalog Folders with the snapshot ETag used by mutations.
create_folder(name, *, if_match, title=None, namespace=None, timeout=None, extra_headers=None)
async
¶
Create a Folder against the supplied catalog snapshot ETag.
update_folder(folder_id, *, if_match, name=None, title=Ellipsis, namespace=None, timeout=None, extra_headers=None)
async
¶
Rename a Folder or update its title; None clears a supplied title.
delete_folder(folder_id, *, if_match, namespace=None, timeout=None, extra_headers=None)
async
¶
Delete an empty Folder and return the resulting catalog ETag.
move_service(service_name, folder_id, *, if_match, namespace=None, timeout=None, extra_headers=None)
async
¶
Move a logical Service to a Folder or to Root when folder_id is None.
list_services(*, timeout=None, extra_headers=None)
async
¶
Read every page of the admin service list.
list_services_page(query=None, *, timeout=None, extra_headers=None)
async
¶
Return one page of admin services and the count of every match.
get_service_settings(name, *, timeout=None, extra_headers=None)
async
¶
Fetch the resolved settings for a single service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Service name as advertised by the catalog. URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
ServiceSettingsResponse
|
class: |
ServiceSettingsResponse
|
availability and per-protocol configuration. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
update_protocols(name, protocols, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Replace the enabled-protocol list for a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Service name; URL-encoded. |
required |
protocols
|
list[str]
|
Desired ordered list of protocol identifiers. |
required |
Returns:
| Type | Description |
|---|---|
ServiceSettingsResponse
|
The refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the update. |
HonuaTransportError
|
The request failed at the transport layer. |
update_access_policy(name, *, allow_anonymous=None, allow_anonymous_write=None, allowed_roles=None, allowed_write_roles=None, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
PUT service access policy and return refreshed service settings.
name is encoded as one URL path segment. Omitted/None fields
preserve their server values; False disables anonymous access and
an empty role list clears that restriction. For example,
update_access_policy("default", allow_anonymous=True) sends
exactly {"allowAnonymous": true}.
Per-request timeout, header and idempotency overrides use the same conventions and HTTP/transport error types as other admin methods.
update_mapserver_settings(name, *, max_image_width=None, max_image_height=None, default_image_width=None, default_image_height=None, default_dpi=None, default_format=None, default_transparent=None, max_features_per_layer=None, extra_settings=None, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Patch the MapServer-specific settings for a service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Service name; URL-encoded. |
required |
max_image_width
|
int | None
|
Maximum allowed image width in pixels. |
None
|
max_image_height
|
int | None
|
Maximum allowed image height in pixels. |
None
|
default_image_width
|
int | None
|
Default image width applied when callers omit one. |
None
|
default_image_height
|
int | None
|
Default image height applied when callers omit one. |
None
|
default_dpi
|
int | None
|
Default DPI used when callers omit one. |
None
|
default_format
|
str | None
|
Default image format (e.g. |
None
|
default_transparent
|
bool | None
|
Default transparency setting for rendered tiles. |
None
|
max_features_per_layer
|
int | None
|
Server-side cap on features returned per layer. |
None
|
extra_settings
|
Mapping[str, Any] | None
|
Escape hatch for additional snake-case settings that
aren't represented as explicit kwargs. Keys are converted to
camelCase before being sent. Only fields with non- |
None
|
Returns:
| Type | Description |
|---|---|
ServiceSettingsResponse
|
The refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the update. |
HonuaTransportError
|
The request failed at the transport layer. |
get_version(*, timeout=None, extra_headers=None)
async
¶
Return the server's reported admin API version.
Returns:
| Name | Type | Description |
|---|---|---|
An |
AdminVersionResponse
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
get_capabilities(*, timeout=None, extra_headers=None)
async
¶
Return the server's advertised admin capabilities and compat block.
Returns:
| Name | Type | Description |
|---|---|---|
An |
AdminCapabilitiesResponse
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
get_capability_flags(*, timeout=None, extra_headers=None)
async
¶
Return coarse feature flags from the admin compatibility contract.
When the server does not expose a compatibility block (older
deployments), the returned flags are all False.
Returns:
| Name | Type | Description |
|---|---|---|
An |
AdminCompatibilityFeatureFlags
|
class: |
AdminCompatibilityFeatureFlags
|
optional admin surfaces the server supports. |
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The underlying capabilities fetch failed with a non-success status. |
HonuaTransportError
|
The capabilities fetch failed at the transport layer. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:get_capabilities.
check_compatibility(*, timeout=None, extra_headers=None)
async
¶
Evaluate whether the connected server satisfies the admin SDK baseline.
Returns:
| Name | Type | Description |
|---|---|---|
An |
AdminCompatibilityCheckResult
|
class: |
AdminCompatibilityCheckResult
|
the server's compatibility block meets |
|
AdminCompatibilityCheckResult
|
attr: |
|
AdminCompatibilityCheckResult
|
specific gaps. |
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The underlying capabilities fetch failed with a non-success status. |
HonuaTransportError
|
The capabilities fetch failed at the transport layer. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:get_capabilities.
scan_migration_source(request, *, export_json=False, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
POST /api/v1/admin/import/scan
validate_toolbox_translation(manifest, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
POST /api/v1/admin/import/toolbox/translation/validate
Validate an SDK-translated source toolbox manifest against the server's canonical geoprocessing process catalog, and return the server-authoritative per-tool classification.
The server owns the round-trip proof: it never parses toolbox sources
and never emulates the scripting API. The SDK proposes a mapping; the catalog
decides whether that mapping is translated,
partially-translated, or unsupported, and returns the specific
reasons a tool cannot be fully translated.
A verdict derived from this call may be presented as server-attested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manifest
|
ToolboxTranslationManifest
|
The translated toolbox manifest to validate. |
required |
Returns:
| Type | Description |
|---|---|
ToolboxTranslationReport
|
The server's :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the manifest (for example an
unsupported |
HonuaTransportError
|
The request failed at the transport layer. |
list_connections(*, timeout=None, extra_headers=None)
async
¶
List every secure datasource connection registered on the server.
Returns:
| Name | Type | Description |
|---|---|---|
Typed |
list[SecureConnectionSummary]
|
class: |
list[SecureConnectionSummary]
|
the server returns a non-list payload. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
get_connection(id, *, timeout=None, extra_headers=None)
async
¶
Fetch detailed information for a single secure connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Connection identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
SecureConnectionDetail
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
create_connection(request, *, idempotency_key=None, timeout=None, extra_headers=None)
async
¶
Create a new secure datasource connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateSecureConnectionRequest
|
Connection definition (DSN, credentials, options). |
required |
idempotency_key
|
str | None
|
Stripe-style |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
SecureConnectionSummary
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the create. |
HonuaTransportError
|
The request failed at the transport layer. |
test_draft_connection(request, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Verify a draft connection definition without persisting it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateSecureConnectionRequest
|
The same payload that would be sent to
:meth: |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
ConnectionTestResult
|
class: |
ConnectionTestResult
|
in the result payload, not as an exception. |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server returned a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
update_connection(id, request, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Replace mutable fields on an existing secure connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Connection identifier; URL-encoded. |
required |
request
|
UpdateSecureConnectionRequest
|
Patch payload describing the new state. |
required |
Returns:
| Type | Description |
|---|---|
SecureConnectionSummary
|
A refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the update. |
HonuaTransportError
|
The request failed at the transport layer. |
test_connection(id, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Re-run the server-side connection probe for a stored connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Connection identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
ConnectionTestResult
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server itself rejected the request. |
HonuaTransportError
|
The request failed at the transport layer. |
delete_connection(id, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Delete a stored secure connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Connection identifier; URL-encoded. |
required |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the delete. |
HonuaTransportError
|
The request failed at the transport layer. |
validate_encryption(*, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Verify that the server can decrypt every stored credential.
Returns:
| Name | Type | Description |
|---|---|---|
An |
EncryptionValidationResult
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
rotate_encryption_key(*, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Rotate the server's connection-encryption key.
Returns:
| Name | Type | Description |
|---|---|---|
A |
KeyRotationResult
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the rotation request. |
HonuaTransportError
|
The request failed at the transport layer. |
list_layers(conn_id, service_name=None, *, timeout=None, extra_headers=None)
async
¶
Read every page of layers published on a connection.
list_layers_page(conn_id, query=None, *, timeout=None, extra_headers=None)
async
¶
Return one page of layers published on a connection.
publish_layer(conn_id, request, *, idempotency_key=None, timeout=None, extra_headers=None)
async
¶
Publish a new layer derived from a stored connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Connection identifier; URL-encoded. |
required |
request
|
PublishLayerRequest
|
Layer-publication payload. |
required |
idempotency_key
|
str | None
|
Stripe-style |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
PublishedLayerSummary
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the publish request. |
HonuaTransportError
|
The request failed at the transport layer. |
set_layer_enabled(conn_id, layer_id, enabled, service_name=None, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Toggle whether a single published layer is enabled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Connection identifier; URL-encoded. |
required |
layer_id
|
int
|
Numeric layer identifier. |
required |
enabled
|
bool
|
Desired |
required |
service_name
|
str | None
|
Optional service-scoped toggle. |
None
|
Returns:
| Type | Description |
|---|---|
PublishedLayerSummary
|
The refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the toggle. |
HonuaTransportError
|
The request failed at the transport layer. |
set_service_layers_enabled(conn_id, enabled, service_name=None, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Toggle every layer on a connection (optionally per service) in bulk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Connection identifier; URL-encoded. |
required |
enabled
|
bool
|
Desired |
required |
service_name
|
str | None
|
Optional per-service restriction. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Refreshed |
list[PublishedLayerSummary]
|
class: |
list[PublishedLayerSummary]
|
affected layer; empty when the server returns a non-list |
|
list[PublishedLayerSummary]
|
payload. |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the bulk toggle. |
HonuaTransportError
|
The request failed at the transport layer. |
discover_tables(conn_id, *, timeout=None, extra_headers=None)
async
¶
Ask the server which tables are visible through a connection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Connection identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
TableDiscoveryResponse
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
list_styles(*, timeout=None, extra_headers=None)
async
¶
List the styles published over OGC API - Styles (GET /ogc/styles).
Returns:
| Name | Type | Description |
|---|---|---|
An |
OgcStylesList
|
class: |
OgcStylesList
|
optional default style and landing links. |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
get_stylesheet(style_id, *, encoding=_DEFAULT_STYLE_ENCODING, timeout=None, extra_headers=None)
async
¶
Fetch a stylesheet by style_id (GET /ogc/styles/{styleId}).
The encoding is selected by Accept content negotiation:
mapbox-style (MapLibre/Mapbox JSON, the default), sld-1.0,
or sld-1.1 (derived on demand by the server).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style_id
|
str
|
Stable style identifier. |
required |
encoding
|
StyleEncoding
|
Desired stylesheet encoding (see :data: |
DEFAULT_STYLE_ENCODING
|
Returns:
| Name | Type | Description |
|---|---|---|
An |
OgcStylesheet
|
class: |
OgcStylesheet
|
|
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status (e.g. 404 unknown style, 406 unsupported encoding). |
HonuaTransportError
|
The request failed at the transport layer. |
get_style_metadata(style_id, *, timeout=None, extra_headers=None)
async
¶
Fetch style metadata (GET /ogc/styles/{styleId}/metadata).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style_id
|
str
|
Stable style identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
An |
OgcStyleMetadata
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
update_style(style_id, style, *, strict=False, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Replace an existing style's MapLibre stylesheet (PUT /ogc/styles/{styleId}).
Phase 1 manage-styles accepts only a MapLibre/Mapbox style
document; the server validates and stores it against the existing
style. Standalone style creation/deletion is not yet supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style_id
|
str
|
Stable style identifier (must already exist). |
required |
style
|
Mapping[str, Any]
|
The MapLibre/Mapbox stylesheet document. |
required |
strict
|
bool
|
When |
False
|
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the update (e.g. 400 invalid style, 404 unknown style, 415 unsupported media type). |
HonuaTransportError
|
The request failed at the transport layer. |
get_layer_style(layer_id, *, timeout=None, extra_headers=None)
async
¶
Fetch the stored renderer / style document for a layer.
.. deprecated::
This layerId-keyed path is a back-compat alias (ADR-0048).
Prefer the styleId-keyed :meth:get_stylesheet /
:meth:get_style_metadata over OGC API - Styles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer_id
|
int
|
Numeric layer identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
LayerStyleResponse
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |
update_layer_style(layer_id, request, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Replace the stored renderer / style document for a layer.
.. deprecated::
This layerId-keyed path is a back-compat alias (ADR-0048).
Prefer the styleId-keyed :meth:update_style over OGC
API - Styles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer_id
|
int
|
Numeric layer identifier. |
required |
request
|
LayerStyleUpdateRequest
|
The new renderer payload. |
required |
Returns:
| Type | Description |
|---|---|
LayerStyleResponse
|
A refreshed :class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server rejected the style update. |
HonuaTransportError
|
The request failed at the transport layer. |
list_proposals(*, status=None, kind=None, requested_by=None, timeout=None, extra_headers=None)
async
¶
List guardrail-routed operation proposals.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status
|
str | None
|
Case-insensitive lifecycle filter ( |
None
|
kind
|
str | None
|
Case-insensitive operation-class filter; the server ignores values it cannot parse. |
None
|
requested_by
|
str | None
|
Case-insensitive match on the requesting principal. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Typed |
list[OperationProposalSummary]
|
class: |
list[OperationProposalSummary]
|
server returns no |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status
( |
HonuaTransportError
|
The request failed at the transport layer. |
get_proposal(id, *, timeout=None, extra_headers=None)
async
¶
Fetch one operation proposal with its plan and resolution state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Opaque proposal identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
An |
OperationProposalDetail
|
class: |
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status
( |
HonuaTransportError
|
The request failed at the transport layer. |
approve_proposal(id, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Approve an operation proposal and apply it through the gateway.
The server enforces separation of duties: the principal that requested a proposal cannot approve it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Opaque proposal identifier; URL-encoded. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
The |
OperationProposalDetail
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server refused the approval ( |
HonuaTransportError
|
The request failed at the transport layer. |
reject_proposal(id, reason, *, timeout=None, extra_headers=None, idempotency_key=None)
async
¶
Reject an operation proposal with a required reason.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Opaque proposal identifier; URL-encoded. |
required |
reason
|
str
|
Non-blank rejection reason recorded on the proposal. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
The |
OperationProposalDetail
|
class: |
Per-request options (timeout / extra_headers /
idempotency_key) are forwarded to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server refused the rejection ( |
HonuaTransportError
|
The request failed at the transport layer. |
get_config(*, timeout=None, extra_headers=None)
async
¶
Return the server's effective admin configuration block.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
The server-side admin config as a plain |
dict[str, Any]
|
|
Per-request options (timeout / extra_headers) are forwarded
to :meth:_request.
Raises:
| Type | Description |
|---|---|
HonuaHttpError
|
The server responded with a non-success status. |
HonuaTransportError
|
The request failed at the transport layer. |