GoodMemGoodMem
ReferenceSdkV2.NET

System

Server info + system initialization.

Namespace: Goodmem.Client.Api · Class: SystemApi

Reach this surface as client.System on a GoodmemClient. Every network method is asynchronous — it returns a Task<T> (or an IAsyncEnumerable<T> for pagination and streaming) and accepts a CancellationToken; the Async suffix marks the standard .NET Task-based async pattern.

Methods

MethodSummary
InfoAsyncRetrieve server build metadata.
InitAsyncInitialize the system.

InfoAsync

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.

Declaration

public Task<SystemInfoResponse> InfoAsync(CancellationToken ct = default)

HTTPGET /v1/system/info

Parameters

TypeNameDescription
CancellationTokenctCancellation / deadline signal for the call. (optional)

Returns

Task<SystemInfoResponse> — an awaitable that resolves to SystemInfoResponse.

Exceptions

TypeCondition
NetworkExceptionThe request could not reach the server (DNS, connection, or TLS failure).
ApiExceptionThe server returned a non-success (non-2xx) status. A status-specific subtype is thrown where it applies — e.g. NotFoundException (404), PermissionDeniedException (403), ConflictException (409).

Example

var info = await client.System.InfoAsync();
Console.WriteLine(info.Version);


InitAsync

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.

Declaration

public Task<SystemInitResponse> InitAsync(CancellationToken ct = default)

HTTPPOST /v1/system/init

Parameters

TypeNameDescription
CancellationTokenctCancellation / deadline signal for the call. (optional)

Returns

Task<SystemInitResponse> — an awaitable that resolves to SystemInitResponse.

Exceptions

TypeCondition
NetworkExceptionThe request could not reach the server (DNS, connection, or TLS failure).
ApiExceptionThe server returned a non-success (non-2xx) status. A status-specific subtype is thrown where it applies — e.g. NotFoundException (404), PermissionDeniedException (403), ConflictException (409).

Example

var result = await client.System.InitAsync();
Console.WriteLine(result.AlreadyInitialized);


Data Models

Types in the Goodmem.Client.Models namespace. Each row lists the C# property, its type, the JSON wire name, and a description.

SystemInfoResponse

PropertyTypeJSON (wire)Description
VersionstringversionSemantic version string advertised by the running server.
MajorintmajorMajor version component parsed from the advertised semantic version.
MinorintminorMinor version component parsed from the advertised semantic version.
PatchintpatchPatch version component parsed from the advertised semantic version.
DirtybooldirtyWhether the running build reports uncommitted workspace changes.
GitCommitstringgitCommitGit commit SHA baked into the build, when available. (optional)
GitDescribestringgitDescribeGit describe output baked into the build, when available. (optional)
BuildTimestringbuildTimeBuild timestamp recorded for this server binary, when available. (optional)
CapabilitiesIReadOnlyDictionary<string, string>capabilitiesOptional capability flags or metadata advertised by the running server. (optional)

SystemInitResponse

Response from the system initialization endpoint.

PropertyTypeJSON (wire)Description
AlreadyInitializedboolalreadyInitializedIndicates whether the system was already initialized before this request.
MessagestringmessageA human-readable message about the initialization status.
RootApiKeystringrootApiKeyThe API key for the root user. Only present if system was just initialized (not previously initialized). (optional)
UserIdstringuserIdThe user ID of the root user. Only present if system was just initialized (not previously initialized). (optional)