GoodMem
ReferenceClient SDKsJava SDK

System API

System API documentation for Java SDK

All URIs are relative to *http://localhost:8080*

MethodHTTP requestDescription
getSystemInfoGET /v1/system/infoRetrieve server build metadata
initializeSystemPOST /v1/system/initInitialize the system

getSystemInfo

SystemInfoResponse getSystemInfo()

Retrieve server build metadata

Returns the server's advertised semantic version, git metadata, build timestamp, and optional capability flags. The endpoint is intentionally unauthenticated so bootstrap tooling can call it before API keys exist.

Example

// Import classes:
import ai.pairsys.goodmem.client.ApiClient;
import ai.pairsys.goodmem.client.ApiException;
import ai.pairsys.goodmem.client.Configuration;
import ai.pairsys.goodmem.client.models.*;
import ai.pairsys.goodmem.client.api.SystemApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("[http://localhost:8080](http://localhost:8080)");

    SystemApi apiInstance = new SystemApi(defaultClient);
    try {
      SystemInfoResponse result = apiInstance.getSystemInfo();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SystemApi#getSystemInfo");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

SystemInfoResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Server build metadata-
500Internal server error-

initializeSystem

SystemInitResponse initializeSystem(body)

Initialize the system

Initializes the system by creating a root user and API key. This endpoint should only be called once during first-time setup. If the system is already initialized, the endpoint will return a success response without creating new credentials.

Example

// Import classes:
import ai.pairsys.goodmem.client.ApiClient;
import ai.pairsys.goodmem.client.ApiException;
import ai.pairsys.goodmem.client.Configuration;
import ai.pairsys.goodmem.client.models.*;
import ai.pairsys.goodmem.client.api.SystemApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("[http://localhost:8080](http://localhost:8080)");

    SystemApi apiInstance = new SystemApi(defaultClient);
    Object body = null; // Object | Empty request body - no parameters required
    try {
      SystemInitResponse result = apiInstance.initializeSystem(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SystemApi#initializeSystem");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
bodyObjectEmpty request body - no parameters required[optional]

Return type

SystemInitResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200System initialization successful-
500Internal server error during initialization-