System API
System API documentation for Java SDK
All URIs are relative to *http://localhost:8080*
| Method | HTTP request | Description |
|---|---|---|
| getSystemInfo | GET /v1/system/info | Retrieve server build metadata |
| initializeSystem | POST /v1/system/init | Initialize 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
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Server build metadata | - |
| 500 | Internal 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
| Name | Type | Description | Notes |
|---|---|---|---|
| body | Object | Empty request body - no parameters required | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | System initialization successful | - |
| 500 | Internal server error during initialization | - |