System API
System API documentation for JavaScript 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 GoodMemClient from '@pairsystems/goodmem-client';
let apiInstance = new GoodMemClient.SystemApi();
apiInstance.getSystemInfo().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
initializeSystem
SystemInitResponse initializeSystem(opts)
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 GoodMemClient from '@pairsystems/goodmem-client';
let apiInstance = new GoodMemClient.SystemApi();
let opts = {
'body': {key: null} // Object | Empty request body - no parameters required
};
apiInstance.initializeSystem(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});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