System API
System API documentation for .NET 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
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;
namespace Example
{
public class GetSystemInfoExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "[http://localhost";](http://localhost";)
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
try
{
// Retrieve server build metadata
SystemInfoResponse result = apiInstance.GetSystemInfo();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SystemApi.GetSystemInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}Using the GetSystemInfoWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Retrieve server build metadata
`ApiResponse<SystemInfoResponse>` response = apiInstance.GetSystemInfoWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SystemApi.GetSystemInfoWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}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 (Object? body = null)
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
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;
namespace Example
{
public class InitializeSystemExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "[http://localhost";](http://localhost";)
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new SystemApi(httpClient, config, httpClientHandler);
var body = null; // Object? | Empty request body - no parameters required (optional)
try
{
// Initialize the system
SystemInitResponse result = apiInstance.InitializeSystem(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SystemApi.InitializeSystem: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}Using the InitializeSystemWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Initialize the system
`ApiResponse<SystemInitResponse>` response = apiInstance.InitializeSystemWithHttpInfo(body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SystemApi.InitializeSystemWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}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 | - |