GoodMemGoodMem
ReferenceClient SDKsRust

Admin

Rust admin API reference: typed methods, request options, return values, and resource models.

goodmem::api::Admin

Access this service with client.admin().

pub struct Admin<'a> {
    /* private fields */
}

Methods

MethodHTTPPath
background_jobs_purgePOST/v1/admin/background-jobs:purge
drainPOST/v1/admin:drain
license_reloadPOST/v1/admin/license:reload
retrieve_memory_log_policies_createPOST/v1/admin/retrieve-memory-log-policies
retrieve_memory_log_policies_deleteDELETE/v1/admin/retrieve-memory-log-policies/{id}
retrieve_memory_log_policies_getGET/v1/admin/retrieve-memory-log-policies/{id}
retrieve_memory_log_policies_listGET/v1/admin/retrieve-memory-log-policies
transfer_instance_ownershipPOST/v1/admin:transferInstanceOwnership

Errors and cancellation

Calls return Result<T>. See Error for validation, HTTP, transport, decoding, and timeout failures. Stream items can also return errors after the call succeeds.

Pagination helpers fetch pages when polled. Drop a page or event stream to cancel further work.

Implementations

impl Admin<'_>

background_jobs_purge

pub async fn background_jobs_purge( &self, body: &AdminPurgeJobsRequest, ) -> Result<AdminPurgeJobsResponse>

Purge completed background jobs

Deletes terminal background jobs older than a retention cutoff.

Errors include local validation, HTTP failures, and malformed responses.

HTTP: POST /v1/admin/background-jobs:purge

drain

pub async fn drain(&self, body: &AdminDrainRequest) -> Result<AdminDrainResponse>

Request the server to enter drain mode

Initiates drain mode and optionally waits for the server to quiesce.

Errors include local validation, HTTP failures, and malformed responses.

HTTP: POST /v1/admin:drain

license_reload

pub async fn license_reload(&self) -> Result<AdminReloadLicenseResponse>

Reload the active license from disk

Triggers the server to reload its license file from the configured directory and returns metadata about the currently active license.

Errors include local validation, HTTP failures, and malformed responses.

HTTP: POST /v1/admin/license:reload

retrieve_memory_log_policies_create

pub async fn retrieve_memory_log_policies_create( &self, body: &CreateRetrieveMemoryLogPolicyRequest, ) -> Result<RetrieveMemoryLogPolicy>

Create a RetrieveMemory log policy

Creates an immutable administrative policy that can automatically enable durable RetrieveMemory request logging.

Errors include local validation, HTTP failures, and malformed responses.

HTTP: POST /v1/admin/retrieve-memory-log-policies

retrieve_memory_log_policies_delete

pub async fn retrieve_memory_log_policies_delete( &self, id: impl std::fmt::Display, body: &DeleteRetrieveMemoryLogPolicyRequest, ) -> Result<RetrieveMemoryLogPolicy>

Delete a RetrieveMemory log policy

Idempotently tombstones an immutable RetrieveMemory log policy.

Errors include local validation, HTTP failures, and malformed responses.

HTTP: DELETE /v1/admin/retrieve-memory-log-policies/{id}

retrieve_memory_log_policies_get

pub async fn retrieve_memory_log_policies_get( &self, id: impl std::fmt::Display, options: &AdminRetrieveMemoryLogPoliciesGetOptions, ) -> Result<RetrieveMemoryLogPolicy>

Get a RetrieveMemory log policy

Retrieves a live RetrieveMemory log policy by UUID, or a tombstoned policy when includeDeleted is true.

Errors include local validation, HTTP failures, and malformed responses.

HTTP: GET /v1/admin/retrieve-memory-log-policies/{id}

retrieve_memory_log_policies_list

pub async fn retrieve_memory_log_policies_list( &self, options: &AdminRetrieveMemoryLogPoliciesListOptions, ) -> Result<ListRetrieveMemoryLogPoliciesResponse>

List RetrieveMemory log policies

Lists RetrieveMemory log policies with optional tombstone, active-time, name, label, sort, and pagination filters.

LABEL FILTERS: Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production).

Errors include local validation, HTTP failures, and malformed responses.

HTTP: GET /v1/admin/retrieve-memory-log-policies

transfer_instance_ownership

pub async fn transfer_instance_ownership( &self, body: &TransferOwnershipRequest, ) -> Result<TransferInstanceOwnershipResponse>

Transfer GoodMem instance ownership

Transfers the singleton GoodMem instance to another active human principal. Only the current instance owner may invoke this operation; ADMIN, MANAGE_ACCESS, and ordinary grants are insufficient. Ownership and the synthetic ROOT assignment move atomically. All ordinary roles, including ADMIN, remain unchanged. No credential is created or returned. After an unknown outcome, read the current owner before retrying.

Errors include local validation, HTTP failures, and malformed responses.

HTTP: POST /v1/admin:transferInstanceOwnership

Types

Trait implementations

  • Clone (derived)
  • Copy (derived)
  • Debug (derived)

On this page