Admin
Methods on this page are called as client.admin.<method>(...) on a Goodmem instance.
Class — ai.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.
HTTP — POST /v1/admin/background-jobs:purge
Parameters
request(AdminPurgeJobsRequest) — full request payload. The linked Javadoc lists every field and itsBuildersetter.
Returns — AdminPurgeJobsResponse
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.
HTTP — POST /v1/admin:drain
Parameters
request(AdminDrainRequest) — full request payload. The linked Javadoc lists every field and itsBuildersetter.
Returns — AdminDrainResponse
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.
HTTP — POST /v1/admin/license:reload
Parameters
(no parameters)
Returns — AdminReloadLicenseResponse
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.
HTTP — POST /v1/admin/retrieve-memory-log-policies
Parameters
request(CreateRetrieveMemoryLogPolicyRequest) — full request payload. The linked Javadoc lists every field and itsBuildersetter.
Returns — RetrieveMemoryLogPolicy
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.
HTTP — DELETE /v1/admin/retrieve-memory-log-policies/{id}
Parameters
id(String) — The UUID of the policy to deleterequest(DeleteRetrieveMemoryLogPolicyRequest) — full request payload. The linked Javadoc lists every field and itsBuildersetter.
Returns — RetrieveMemoryLogPolicy
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.
HTTP — GET /v1/admin/retrieve-memory-log-policies/{id}
Parameters
id(String) — The UUID of the policy to retrievequery(Map<String, Object>) — query-string parameters; useMap.of()when none.
Returns — RetrieveMemoryLogPolicy
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).
HTTP — GET /v1/admin/retrieve-memory-log-policies
Parameters
query(Map<String, Object>) — query-string parameters; useMap.of()when none.
Returns — Page<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.