Server details and version

The server exposes a few endpoints for getting information about the server or checking if the server is running.

Prerequisites

Before using the Models API, you need a valid authentication token. If you haven't obtained one yet, please refer to the Authentication guide. The examples below assume you have already set up authentication:

import RxInferClientOpenAPI.OpenAPI.Clients: Client
import RxInferClientOpenAPI: ServerApi

client = Client(basepath(ServerApi); headers = Dict(
    "Authorization" => "Bearer $token"
))

api = ServerApi(client)

Pinging the Server

You can ping the server to check if it's running. This should return { "status": "ok" } if the server is running.

import RxInferClientOpenAPI
import RxInferClientOpenAPI.OpenAPI.Clients: Client
import RxInferClientOpenAPI: ServerApi, ping_server, basepath

response, _ = ping_server(api)
response
{
  "status": "ok"
}
Note

The ping endpoint does not require authentication.

Getting Server Information

You can also get information about the server properties, such as the server version, running Julia version and the RxInfer version:

import RxInferClientOpenAPI: get_server_info

response, _ = get_server_info(api)
response
{
  "rxinfer_version": "4.4.1",
  "server_version": "0.1.4",
  "server_edition": "CommunityEdition",
  "julia_version": "1.11.4",
  "api_version": "v1"
}