GoodMemGoodMem
ReferenceSDKsJava

Users

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

Classai.pairsys.goodmem.client.api.UsersAPI (extends internal UsersAPIBase).

import ai.pairsys.goodmem.client.Goodmem;

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

Async variants

Every method listed below also exists on ai.pairsys.goodmem.client.api.AsyncUsersAPI (accessed via asyncClient.users 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.users.<method>(...)  // returns CompletableFuture<T>
}

Method Detail

get(UsersGetOptions)

UserResponse get(UsersGetOptions opts)

Retrieves a user by ID or email address. Exactly one of id and email must be provided.

HTTPGET /v1/users/&#123;id&#125;

Parameters

  • opts (UsersGetOptions) — options bag. Set exactly one of its fields (the compact constructor enforces "exactly one"). Mirrors Python's kwargs form and the AWS / GCP / Azure / OpenAI options-bag norm. The linked Javadoc lists every field.

ReturnsUserResponse

Example

UserResponse userResponse = client.users.get(UsersGetOptions.builder().build());

REST equivalent

curl -X GET 'http://localhost:8080/v1/users/{id}' \
  -H "x-api-key: gm_..."

me()

UserResponse me()

Retrieves the authenticated user's profile information including email, display name, and creation time. This endpoint does not require any parameters as it automatically returns the caller's information.

HTTPGET /v1/users/me

Parameters

(no parameters)

ReturnsUserResponse

Example

UserResponse userResponse = client.users.me();

REST equivalent

curl -X GET 'http://localhost:8080/v1/users/me' \
  -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.