API reference¶
The complete typed API covers every server operation. See the route-to-method table for the full surface.
Clients¶
hubuum_client.Client ¶
Blocking client for the Hubuum server API.
Use the client as a context manager so its connection pool is closed
deterministically. request is the safe extension point for routes that
do not yet have a dedicated service method.
_http
instance-attribute
¶
_http = httpx.Client(
base_url=self._base_url,
timeout=client_options.timeout,
verify=client_options.verify,
transport=transport,
headers={
"User-Agent": client_options.user_agent
or f"hubuum-client-python/{__version__}"
},
)
credential_approvals
cached
property
¶
Return operation-bound password approval and evidence operations.
event_sinks
cached
property
¶
Administrator sink management and explicit collection grants.
is_authenticated
property
¶
Return whether the client currently holds an access token.
openapi
property
¶
Return the complete operation-ID interface for all 272 v0.0.22 operations.
service_accounts
cached
property
¶
Return typed service-account lifecycle and pagination operations.
login_session ¶
Opt into rotating interactive credentials, retained only in memory.
Requires the versioned session API. Refresh is serialized per client; failed or uncertain refresh destroys local credentials and is never retried.
metrics_at ¶
Return unauthenticated metrics text from an origin-locked custom path.
request ¶
request(
method: str,
path: str,
*,
json: (
BaseModel | Mapping[str, Any] | list[Any] | None
) = None,
response_model: type[T],
options: RequestOptions | None = None
) -> T
request(
method: str,
path: str,
*,
json: (
BaseModel | Mapping[str, Any] | list[Any] | None
) = None,
response_model: None = None,
options: RequestOptions | None = None
) -> Any
Send an authenticated, origin-locked request to a relative API path.
Supply response_model to validate a JSON response. Prefer a typed
resource service when one exists; this method is the constrained
extension point for server routes outside that surface.
stream ¶
Stream one origin-locked response without exposing request secrets.
hubuum_client.AsyncClient ¶
Async client with the same resource surface as :class:Client.
_http
instance-attribute
¶
_http = httpx.AsyncClient(
base_url=self._base_url,
timeout=client_options.timeout,
verify=client_options.verify,
transport=transport,
headers={
"User-Agent": client_options.user_agent
or f"hubuum-client-python/{__version__}"
},
)
credential_approvals
cached
property
¶
Return operation-bound password approval and evidence operations.
event_sinks
cached
property
¶
Administrator sink management and explicit collection grants.
is_authenticated
property
¶
Return whether the client currently holds an access token.
openapi
property
¶
Return the complete operation-ID interface for all 272 v0.0.22 operations.
service_accounts
cached
property
¶
Return typed service-account lifecycle and pagination operations.
_request_stream_response
async
¶
login_session
async
¶
Opt into rotating interactive credentials, retained only in memory.
Requires the versioned session API. Refresh is serialized per client; failed or uncertain refresh destroys local credentials and is never retried.
metrics_at
async
¶
Return unauthenticated metrics text from an origin-locked custom path.
request
async
¶
request(
method: str,
path: str,
*,
json: (
BaseModel | Mapping[str, Any] | list[Any] | None
) = None,
response_model: type[T],
options: RequestOptions | None = None
) -> T
request(
method: str,
path: str,
*,
json: (
BaseModel | Mapping[str, Any] | list[Any] | None
) = None,
response_model: None = None,
options: RequestOptions | None = None
) -> Any
Send an authenticated, origin-locked request to a relative API path.
Supply response_model to validate a JSON response. Prefer a typed
resource service when one exists; this method is the constrained
extension point for server routes outside that surface.
stream
async
¶
Stream one origin-locked response without exposing request secrets.
hubuum_client.ClientOptions
dataclass
¶
Connection behavior shared by synchronous and asynchronous clients.
hubuum_client.RequestOptions
dataclass
¶
Transport controls for one origin-locked request.
hubuum_client.OpenAPIOptions
dataclass
¶
Path, query, header, and response controls for an OpenAPI operation.
hubuum_client.OperationSpec ¶
hubuum_client.OpenAPIOperations ¶
Invoke every operation in Hubuum v0.0.22 by its stable OpenAPI operationId.
hubuum_client.AsyncOpenAPIOperations ¶
Asynchronous operation-ID interface for the complete v0.0.22 contract.
hubuum_client.ResponseStream ¶
A synchronous response body consumed inside Client.stream().
hubuum_client.AsyncResponseStream ¶
An asynchronous response body consumed inside AsyncClient.stream().
Service accounts¶
hubuum_client.services.ServiceAccountsService ¶
Bases: ResourceService[ServiceAccount, ServiceAccountPoint, ServiceAccountCreate, ServiceAccountUpdate]
Manage automation identities with guarded lists and revision-owned mutations.
delete ¶
Delete the account, optionally requiring the current ETag.
disable ¶
Disable the account and revoke its tokens, with an optional ETag check.
get_by_name ¶
Find exactly one account, optionally restricting its identity scope.
update ¶
Edit description or ownership, optionally requiring the current ETag.
hubuum_client.async_services.AsyncServiceAccountsService ¶
Bases: AsyncResourceService[ServiceAccount, ServiceAccountPoint, ServiceAccountCreate, ServiceAccountUpdate]
Manage automation identities with guarded lists and revision-owned mutations.
delete
async
¶
Delete the account, optionally requiring the current ETag.
disable
async
¶
Disable the account and revoke its tokens, with an optional ETag check.
get_by_name
async
¶
Find exactly one account, optionally restricting its identity scope.
update
async
¶
Edit description or ownership, optionally requiring the current ETag.
hubuum_client.ServiceAccount ¶
Bases: _ServiceAccountBase
Service-account list record, including its identity-scope name.
hubuum_client.ServiceAccountPoint ¶
Bases: _ServiceAccountBase
Revision-owned point response, including the identity-scope ID.
hubuum_client.ServiceAccountCreate ¶
Bases: RequestModel
Create an automation identity owned by a group; no password is accepted.
hubuum_client.ServiceAccountUpdate ¶
Bases: RequestModel
Edit description or ownership. Use an empty string to clear description.
Task-backed services¶
hubuum_client.services.TasksService ¶
Inspect, paginate, and wait for asynchronous Hubuum tasks.
_service
instance-attribute
¶
all ¶
Collect visible tasks with explicit page and item safety bounds.
all_events ¶
Collect a task's events with explicit page and item bounds.
cancel ¶
Request cancellation; 202 means cleanup is pending, so use wait() for completion.
event_pages ¶
Iterate bounded cursor pages from a task's event history.
wait ¶
Poll until a task reaches a terminal state or the timeout expires.
hubuum_client.async_services.AsyncTasksService ¶
Inspect, paginate, and wait for asynchronous Hubuum tasks.
_service
instance-attribute
¶
all
async
¶
Collect visible tasks with explicit page and item safety bounds.
all_events
async
¶
Collect a task's events with explicit page and item bounds.
cancel
async
¶
Request cancellation; 202 means cleanup is pending, so use wait() for completion.
event_pages
async
¶
Iterate bounded cursor pages from a task's event history.
events_page
async
¶
Return one cursor page from a task's event history.
wait
async
¶
Poll until a task reaches a terminal state or the timeout expires.
hubuum_client.services.ImportsService ¶
Submit imports and inspect their task and per-entity outcomes.
all_results ¶
Collect import outcomes with explicit page and item bounds.
result_pages ¶
Iterate bounded cursor pages of per-entity import outcomes.
results_page ¶
Return one cursor page of per-entity import outcomes.
run ¶
run(
payload,
*,
idempotency_key=None,
approval=None,
timeout_seconds=300.0,
poll_interval=0.5,
max_pages=100,
max_items=10000
)
Submit, await, and collect outcomes within the result page and item bounds.
Both bounds must be positive and are validated before submission. A result limit failure does not undo the import; retrieve the existing task's outcomes with all_results() and larger bounds instead of resubmitting.
submit ¶
Submit an import task, optionally with a replay-safe idempotency key.
hubuum_client.async_services.AsyncImportsService ¶
Async import submission and per-entity outcome inspection.
all_results
async
¶
Collect import outcomes with explicit page and item bounds.
result_pages
async
¶
Iterate bounded cursor pages of per-entity import outcomes.
results
async
¶
Return one page of per-entity import outcomes as a list.
results_page
async
¶
Return one cursor page of per-entity import outcomes.
run
async
¶
run(
payload,
*,
idempotency_key=None,
approval=None,
timeout_seconds=300.0,
poll_interval=0.5,
max_pages=100,
max_items=10000
)
Submit, await, and collect outcomes within the result page and item bounds.
Both bounds must be positive and are validated before submission. A result limit failure does not undo the import; retrieve the existing task's outcomes with all_results() and larger bounds instead of resubmitting.
submit
async
¶
Submit an import task, optionally with a replay-safe idempotency key.
hubuum_client.services.ExportsService ¶
hubuum_client.async_services.AsyncExportsService ¶
Async export submission and typed or rendered output retrieval.
Schema services¶
hubuum_client.services.ClassSchemaService ¶
Stage, inspect, and explicitly activate one class's schema revisions.
activate ¶
Activate with an explicit policy and expected active schema revision.
generate_report ¶
Generate and retain HTML from saved diagnostics.
objects ¶
Read authorized evidence; resume with next_after even after an empty page.
profile ¶
Queue a suggestion; this never stages or activates a schema.
profile_report ¶
Read a completed suggestion. Expired reports return HTTP 410 after 24 hours.
report ¶
Read retained HTML, optionally requesting an attachment response.
revalidate ¶
Queue revalidation of the active revision without changing object data.
suggest ¶
Submit, wait, and fetch a suggestion for explicit review and staging.
hubuum_client.async_services.AsyncClassSchemaService ¶
Stage, inspect, and explicitly activate one class's schema revisions.
activate
async
¶
Activate with an explicit policy and expected active schema revision.
generate_report
async
¶
Generate and retain HTML from saved diagnostics.
objects
async
¶
Read authorized evidence; resume with next_after even after an empty page.
profile
async
¶
Queue a suggestion; this never stages or activates a schema.
profile_report
async
¶
Read a completed suggestion. Expired reports return HTTP 410 after 24 hours.
report
async
¶
Read retained HTML, optionally requesting an attachment response.
revalidate
async
¶
Queue revalidation of the active revision without changing object data.
revisions
async
¶
Read one bounded revision page; resume after its last revision.
suggest
async
¶
Submit, wait, and fetch a suggestion for explicit review and staging.
hubuum_client.SchemaPageOptions
dataclass
¶
Numeric continuation controls for schema revisions and object compliance.
hubuum_client.SchemaStageRequest ¶
Bases: RequestModel
hubuum_client.SchemaActivationRequest ¶
Bases: RequestModel
hubuum_client.SchemaActivationPolicy ¶
Bases: StrEnum
hubuum_client.SchemaRepairReportRequest ¶
Bases: RequestModel
hubuum_client.SchemaRevisionResponse ¶
Bases: HubuumModel
hubuum_client.SchemaActivationResponse ¶
Bases: HubuumModel
hubuum_client.ClassSchemaResponse ¶
Bases: HubuumModel
hubuum_client.SchemaCompliancePage ¶
Bases: HubuumModel
hubuum_client.ObjectComplianceResponse ¶
Bases: HubuumModel
hubuum_client.ObjectSchemaEvidence ¶
Bases: HubuumModel
hubuum_client.SchemaWorkResponse ¶
Bases: HubuumModel
hubuum_client.SchemaImpactResponse ¶
Bases: HubuumModel
hubuum_client.SchemaDiagnostics ¶
Bases: HubuumModel
hubuum_client.SchemaIssue ¶
Bases: HubuumModel
hubuum_client.ImportSchemaActivation ¶
Bases: RequestModel
hubuum_client.TaskCancelRequest ¶
Bases: RequestModel
Idempotent cancellation, optionally conditional on the current task status.
hubuum_client.TaskRemoteSideEffectState ¶
Bases: StrEnum
Conservative dispatch evidence; cancellation cannot undo a remote side effect.
Queries¶
hubuum_client.Query
dataclass
¶
Immutable query parameters for list endpoints.
Reusing a base query is safe because every fluent method returns a new value.
__init__ ¶
__init__(
filters=(),
limit_value=None,
cursor_value=None,
sort_value=None,
include_total_value=None,
)
hubuum_client.QueryFilter
dataclass
¶
hubuum_client.DataField
dataclass
¶
A nested object data path selected from an immutable query.
Each terminal method returns a new :class:Query, so another data()
selection or any normal query control can be chained immediately.
contains_ip ¶
Match a stored network strictly containing the host IP value.
contains_network ¶
Match a stored network containing value.
has_key ¶
Match an object containing key, including a JSON-null value.
icontains ¶
Match a textual value containing value case-insensitively.
iends_with ¶
Match a textual value ending with value case-insensitively.
istarts_with ¶
Match a textual value starting with value case-insensitively.
overlaps_network ¶
Match a stored IP/network overlapping value.
hubuum_client.FilterOperator ¶
hubuum_client.Page
dataclass
¶
hubuum_client.TokenListState ¶
Bases: StrEnum
Retained-token lifecycle subset selected by token list operations.
Core models¶
hubuum_client.Collection ¶
Bases: HubuumModel
hubuum_client.HubuumClass ¶
Bases: HubuumModel
normalize_runtime_collection
classmethod
¶
Normalize the server's embedded collection representation.
hubuum_client.HubuumObject ¶
Bases: HubuumModel
hubuum_client.ObjectDataPatchOperation ¶
Bases: RequestModel
One validated RFC 6902 operation relative to an object's data root.
hubuum_client.ObjectAggregateRow ¶
Bases: HubuumModel
hubuum_client.ObjectAggregateDimensionValue ¶
Bases: HubuumModel
hubuum_client.ObjectAggregateMeasureValue ¶
Bases: HubuumModel
hubuum_client.User ¶
Bases: _UserBase
User metadata returned by collection endpoints.
hubuum_client.UserPoint ¶
Bases: _UserBase
Canonical revision-owned user returned by point mutations and reads.
hubuum_client.Group ¶
hubuum_client.GroupPoint ¶
Bases: HubuumModel
Canonical revision-owned group returned by point mutations and reads.
hubuum_client.ClassRelation ¶
Bases: HubuumModel
A class-to-class relation and its optional per-object cardinality limits.
hubuum_client.ObjectRelation ¶
Bases: HubuumModel
hubuum_client.Task ¶
Bases: HubuumModel
Generic asynchronous task with typed progress, links, and details.
hubuum_client.TaskEvent ¶
Bases: HubuumModel
One event in a task's cursor-paginated lifecycle history.
hubuum_client.TaskProgress ¶
Bases: HubuumModel
Typed item counters reported by an asynchronous task.
hubuum_client.TaskDetails ¶
Bases: HubuumModel
Kind-specific task metadata exposed by Hubuum v0.0.18.
hubuum_client.ClassRelationCreate ¶
Bases: RequestModel
Create a class relation, optionally bounding either object's relation count.
from_max_relations applies independently to each object in the source
class; to_max_relations applies independently to each object in the
destination class. Omit a limit for unlimited cardinality.
hubuum_client.ImportRequest ¶
Bases: _ImportModel
Versioned asynchronous import request for the complete Hubuum graph.
hubuum_client.ImportGraph ¶
Bases: _ImportModel
Strictly typed Hubuum v0.0.22 graph, including identity and integrations.
hubuum_client.ImportIdentityScopeInput ¶
Bases: _ImportModel
Identity scope definition in an administrator import.
hubuum_client.ImportGroupInput ¶
Bases: _ImportModel
Group definition, with exactly one identity-scope selector.
hubuum_client.ImportPrincipalInputHuman ¶
Bases: _ImportPrincipalInput
Human principal; credentials require an import_credentials approval.
hubuum_client.ImportPrincipalInputServiceAccount ¶
Bases: _ImportPrincipalInput
Service account with an owner group and optional creator selector.
hubuum_client.ImportGroupMembershipInput ¶
Bases: _ImportModel
Membership linking one principal and one group.
hubuum_client.ImportMembershipSourceInput ¶
Bases: _ImportModel
Membership provenance with its own identity scope and restore timestamps.
hubuum_client.ImportExportTemplateInput ¶
Bases: _ImportModel
Reusable export or fragment owned by a collection.
hubuum_client.ImportRemoteTargetInput ¶
Bases: _ImportModel
Remote invocation configuration; importing it does not invoke the target.
hubuum_client.ImportEventSinkInput ¶
Bases: _ImportModel
Event sink configuration in an administrator import.
hubuum_client.ImportEventSubscriptionInput ¶
Bases: _ImportModel
Collection subscription linked to one imported or existing event sink.
hubuum_client.ImportComputedFieldInput ¶
Bases: _ImportModel
Class computed field, optionally owned by a personal principal.
hubuum_client.IdentityScopeKey ¶
Bases: _ImportModel
Natural key of an imported or existing identity scope.
hubuum_client.PrincipalKey ¶
Bases: _ImportModel
Principal name, optionally qualified by its identity scope.
hubuum_client.EventSinkKey ¶
Bases: _ImportModel
Natural key of an existing event sink.
hubuum_client.EventDeliveryPolicy ¶
Bases: _ImportModel
Optional minimum interval between admissions to an event sink.
hubuum_client.RemoteAuthConfigNone ¶
Bases: _ImportModel
Remote target without configured authentication.
hubuum_client.RemoteAuthConfigBearerSecret ¶
Bases: _ImportModel
Bearer authentication resolved from a server secret reference.
hubuum_client.RemoteAuthConfigBasicSecret ¶
Bases: _ImportModel
Basic authentication with a username and server secret reference.
hubuum_client.RemoteAuthConfigApiKeySecret ¶
Bases: _ImportModel
API key header resolved from a server secret reference.
hubuum_client.ImportWriteCondition ¶
Bases: RequestModel
One import-v2 write condition checked by the queued worker.
hubuum_client.ImportWriteMode ¶
Bases: StrEnum
Per-item collision and revision behavior for Hubuum import v2.
hubuum_client.RestoreTimestamps ¶
Bases: RequestModel
Original UTC timestamps restored by an authorized import.
Hubuum v0.0.18 accepts timezone-free ISO 8601 values and interprets them as UTC. The update timestamp must not precede the creation timestamp.
hubuum_client.ImportTaskResult ¶
Bases: HubuumModel
Outcome for one entity processed by an import task.
hubuum_client.ImportRunResult
dataclass
¶
hubuum_client.ExportRequest ¶
Bases: RequestModel
Typed request submitted to Hubuum's asynchronous export endpoint.
hubuum_client.ExportScope ¶
Bases: RequestModel
Validated resource boundary for an export request.
Global collection, class, and relation scopes do not accept identifiers.
objects_in_class requires only class_id; related_objects
requires both identifiers.
validate_identifiers ¶
Reject ambiguous scope/identifier combinations before submission.
hubuum_client.ExportJsonResponse ¶
Bases: HubuumModel
Structured output returned for application/json exports.
hubuum_client.RenderedExport
dataclass
¶
Non-JSON export output and the media type selected by the server.
hubuum_client.NewTokenRequest ¶
Bases: RequestModel
Token-mint request using Hubuum's nested scope wire field.
hubuum_client.RenewTokenRequest ¶
Bases: RequestModel
Optional expiry override for a renewed token.
hubuum_client.TokenScope ¶
Bases: RequestModel
Independent permission and resource boundaries for a newly minted token.
hubuum_client.TokenResourceScope ¶
Bases: RequestModel
One collection, class, or object included in a token boundary.
hubuum_client.PrincipalTokenMetadata ¶
hubuum_client.PrincipalTokenPoint ¶
Bases: _TokenMetadataBase
Canonical point-in-time token metadata without routine usage state.
hubuum_client.PrincipalMember ¶
Bases: HubuumModel
Revision-owned membership between a principal and a group.
hubuum_client.MembershipPrincipal ¶
Bases: HubuumModel
Principal details nested in a membership or current-user response.
hubuum_client.CurrentTokenMetadata ¶
Bases: _TokenMetadataBase
Metadata for the token authenticating the current request.
hubuum_client.MeResponse ¶
Bases: HubuumModel
hubuum_client.ClientConfig ¶
Bases: HubuumModel
Public client-safe server configuration.
hubuum_client.ClientAuthenticationConfig ¶
Bases: HubuumModel
Public authentication settings needed by API consumers.
hubuum_client.ClientPaginationConfig ¶
Bases: HubuumModel
Effective pagination settings exposed by the server.
hubuum_client.AccessToken
dataclass
¶
Bearer token and optional authoritative expiry with a redacted representation.
Errors¶
hubuum_client.APIError
dataclass
¶
Bases: HubuumError
A non-successful Hubuum API response.
The access token and request body are intentionally never retained.
hubuum_client.TransportError
dataclass
¶
Bases: HubuumError
A request failed before a valid HTTP response was received.
hubuum_client.DecodeError
dataclass
¶
Bases: HubuumError
The server returned a successful response with an unexpected body.
hubuum_client.TaskUnsuccessfulError
dataclass
¶
Bases: HubuumError
A task reached a terminal state that does not represent full success.
Only the task ID and status are retained. In particular, the server's task summary is excluded because it can contain details derived from submitted data.
hubuum_client.PreconditionFailedError
dataclass
¶
Credential approvals¶
hubuum_client.services.CredentialApprovalsService ¶
hubuum_client.async_services.AsyncCredentialApprovalsService ¶
hubuum_client.CredentialApprovalRequest ¶
Bases: RequestModel
Authenticate the acting human for exactly one intended mutation.
model_validate_json
classmethod
¶
Validate JSON without retaining credentials in JSON-parser errors.
hubuum_client.CredentialApprovalResponse ¶
hubuum_client.CredentialApprovalRecord ¶
Bases: HubuumModel
Retained non-secret evidence, including consumption and invalidation.
hubuum_client.CredentialApprovalSecret ¶
Bases: SecretStr
Single-use approval with redacted string, repr, and JSON serialization.
hubuum_client.CreateTokenOperation ¶
Bases: RequestModel
hubuum_client.RenewTokenOperation ¶
Bases: RequestModel
hubuum_client.CreateUserOperation ¶
Bases: RequestModel
hubuum_client.UpdateUserOperation ¶
Bases: RequestModel
hubuum_client.ImportCredentialsOperation ¶
Bases: RequestModel
hubuum_client.ConfirmRestoreOperation ¶
Bases: RequestModel
hubuum_client.RestoreConfirmRequest ¶
Bases: APIModel
Exact confirmation bound to a staged restore and its capability.
hubuum_client.ReauthenticationRequiredError
dataclass
¶
Bases: PermissionDeniedError
Obtain fresh, operation-bound password approval before retrying.
Task discovery¶
hubuum_client.TaskQuery
dataclass
¶
Bases: Query
Task discovery controls using plain server parameter names.
Inherited limit, sort, cursor, and include_total builders preserve these
fields. Use the named fields below instead of generic where filters.
Historical unknown facts remain distinct from known false values.
hubuum_client.RetainedImportDetails ¶
Bases: HubuumModel
hubuum_client.RetainedExportDetails ¶
Bases: HubuumModel
hubuum_client.RetainedBackupDetails ¶
Bases: HubuumModel
hubuum_client.TaskOutputDiscoveryState ¶
Bases: StrEnum
hubuum_client.SchemaTaskDetails ¶
Bases: HubuumModel
hubuum_client.RebuildTaskDetails ¶
Bases: HubuumModel
hubuum_client.RemoteCallTaskDetails ¶
Bases: APIModel