GoodMemGoodMem
ReferenceSDKsJava

Admin

Methods on this page are called as client.admin.<method>(...) on a Goodmem instance.

Classai.pairsys.goodmem.client.api.AdminAPI (extends internal AdminAPIBase).

import ai.pairsys.goodmem.client.Goodmem;

try (Goodmem client = Goodmem.builder()
        .baseUrl("http://localhost:8080")
        .apiKey("gm_...")
        .build()) {
    // client.admin.<method>(...)
}

Async variants

Every method listed below also exists on ai.pairsys.goodmem.client.api.AsyncAdminAPI (accessed via asyncClient.admin on an AsyncGoodmem) with the same parameter list, wrapped in CompletableFuture<T>. Paginated list methods return CompletableFuture<AsyncPage<T>>. See the async client guide for composition patterns.

import ai.pairsys.goodmem.client.AsyncGoodmem;

try (AsyncGoodmem asyncClient = AsyncGoodmem.builder()
        .baseUrl("http://localhost:8080")
        .apiKey("gm_...")
        .build()) {
    asyncClient.admin.<method>(...)  // returns CompletableFuture<T>
}

Method Detail

backgroundJobsPurge(AdminPurgeJobsRequest)

AdminPurgeJobsResponse backgroundJobsPurge(AdminPurgeJobsRequest request)

Deletes terminal background jobs older than a retention cutoff.

HTTPPOST /v1/admin/background-jobs:purge

Parameters

  • request (AdminPurgeJobsRequest) — full request payload. The linked Javadoc lists every field and its Builder setter.

ReturnsAdminPurgeJobsResponse

Example

AdminPurgeJobsResponse adminPurgeJobsResponse = client.admin.backgroundJobsPurge(AdminPurgeJobsRequest.builder()
            // …set required fields…
            .build());

REST equivalent

curl -X POST 'http://localhost:8080/v1/admin/background-jobs:purge' \
  -H "x-api-key: gm_..." \
  -H "Content-Type: application/json" \
  -d '{ /* AdminPurgeJobsRequest fields, see Javadoc */ }'

drain(AdminDrainRequest)

AdminDrainResponse drain(AdminDrainRequest request)

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

HTTPPOST /v1/admin:drain

Parameters

  • request (AdminDrainRequest) — full request payload. The linked Javadoc lists every field and its Builder setter.

ReturnsAdminDrainResponse

Example

AdminDrainResponse adminDrainResponse = client.admin.drain(AdminDrainRequest.builder()
            // …set required fields…
            .build());

REST equivalent

curl -X POST 'http://localhost:8080/v1/admin:drain' \
  -H "x-api-key: gm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "timeoutSec": 0
  }'

licenseReload()

AdminReloadLicenseResponse licenseReload()

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

HTTPPOST /v1/admin/license:reload

Parameters

(no parameters)

ReturnsAdminReloadLicenseResponse

Example

AdminReloadLicenseResponse adminReloadLicenseResponse = client.admin.licenseReload();

REST equivalent

curl -X POST 'http://localhost:8080/v1/admin/license:reload' \
  -H "x-api-key: gm_..."

retrieveMemoryLogPoliciesCreate(CreateRetrieveMemoryLogPolicyRequest)

RetrieveMemoryLogPolicy retrieveMemoryLogPoliciesCreate(CreateRetrieveMemoryLogPolicyRequest request)

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

HTTPPOST /v1/admin/retrieve-memory-log-policies

Parameters

ReturnsRetrieveMemoryLogPolicy

Example

RetrieveMemoryLogPolicy retrieveMemoryLogPolicy = client.admin.retrieveMemoryLogPoliciesCreate(CreateRetrieveMemoryLogPolicyRequest.builder()
            // …set required fields…
            .build());

REST equivalent

curl -X POST 'http://localhost:8080/v1/admin/retrieve-memory-log-policies' \
  -H "x-api-key: gm_..." \
  -H "Content-Type: application/json" \
  -d '{ /* CreateRetrieveMemoryLogPolicyRequest fields, see Javadoc */ }'

retrieveMemoryLogPoliciesDelete(String, DeleteRetrieveMemoryLogPolicyRequest)

RetrieveMemoryLogPolicy retrieveMemoryLogPoliciesDelete(String id, DeleteRetrieveMemoryLogPolicyRequest request)

Idempotently tombstones an immutable RetrieveMemory log policy.

HTTPDELETE /v1/admin/retrieve-memory-log-policies/&#123;id&#125;

Parameters

  • id (String) — The UUID of the policy to delete
  • request (DeleteRetrieveMemoryLogPolicyRequest) — full request payload. The linked Javadoc lists every field and its Builder setter.

ReturnsRetrieveMemoryLogPolicy

Example

RetrieveMemoryLogPolicy retrieveMemoryLogPolicy = client.admin.retrieveMemoryLogPoliciesDelete("...", DeleteRetrieveMemoryLogPolicyRequest.builder()
            // …set required fields…
            .build());

REST equivalent

curl -X DELETE 'http://localhost:8080/v1/admin/retrieve-memory-log-policies/{id}' \
  -H "x-api-key: gm_..." \
  -H "Content-Type: application/json" \
  -d '{ /* DeleteRetrieveMemoryLogPolicyRequest fields, see Javadoc */ }'

retrieveMemoryLogPoliciesGet(String, Map<String, Object>)

RetrieveMemoryLogPolicy retrieveMemoryLogPoliciesGet(String id, Map<String, Object> query)

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

HTTPGET /v1/admin/retrieve-memory-log-policies/&#123;id&#125;

Parameters

  • id (String) — The UUID of the policy to retrieve
  • query (Map<String, Object>) — query-string parameters; use Map.of() when none.

ReturnsRetrieveMemoryLogPolicy

Example

RetrieveMemoryLogPolicy retrieveMemoryLogPolicy = client.admin.retrieveMemoryLogPoliciesGet("...", java.util.Map.of());

REST equivalent

curl -X GET 'http://localhost:8080/v1/admin/retrieve-memory-log-policies/{id}' \
  -H "x-api-key: gm_..."

retrieveMemoryLogPoliciesList(Map<String, Object>)

Page<RetrieveMemoryLogPolicy> retrieveMemoryLogPoliciesList(Map<String, Object> query)

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).

HTTPGET /v1/admin/retrieve-memory-log-policies

Parameters

  • query (Map<String, Object>) — query-string parameters; use Map.of() when none.

ReturnsPage<RetrieveMemoryLogPolicy>

Example

Page<RetrieveMemoryLogPolicy> page = client.admin.retrieveMemoryLogPoliciesList(java.util.Map.of());

REST equivalent

curl -X GET 'http://localhost:8080/v1/admin/retrieve-memory-log-policies' \
  -H "x-api-key: gm_..."

Errors

Every method on this page may throw the standard HTTP-error class hierarchy rooted at GoodmemException:

BadRequestException (400), AuthenticationException (401), PermissionDeniedException (403), NotFoundException (404), ConflictException (409), UnprocessableEntityException (422), RateLimitException (429), InternalServerException (5xx), or the generic ApiException for any other 4xx/5xx. All are unchecked (RuntimeException). See Errors.

All error classes live in ai.pairsys.goodmem.client.errors and are unchecked (RuntimeException). Async siblings complete the returned CompletableFuture exceptionally with the same types, wrapped in CompletionException at await time. See Errors on the index for the full table.