Common service contracts¶
A request for elevation crosses four services. Resources finds visible knowledge assets and their dependencies. The Reasoner determines what the requested observable means. The Resolver chooses a plan that can answer it in context. The Runtime executes that plan and hosts the resulting observation in a digital twin. The Engine in a client such as Modeler discovers these services and supplies scopes.
| Service | Default local service root | Reference |
|---|---|---|
| Resources | http://127.0.0.1:8092/resources |
Overview · API · Configuration · Web API |
| Reasoner | http://127.0.0.1:8091/reasoner |
Overview · API · Configuration · Web API |
| Resolver | http://127.0.0.1:8093/resolver |
Overview · API · Configuration · Web API |
| Runtime | http://127.0.0.1:8094/runtime |
Overview · API · Configuration · Web API |
Use the service URL advertised by your deployment. The tables in this reference give paths relative to that root, including its context path. The default local Reasoner status request, for example, is:
curl --fail --silent --show-error http://127.0.0.1:8091/reasoner/public/status
Availability and access¶
| Request on any service | What to inspect |
|---|---|
GET /public/health |
Aggregate process health. |
GET /public/status |
Operational availability. A service may be reachable while it is still starting or waiting for dependencies. |
GET /public/capabilities |
Service identity, supported capabilities and advertised schemata. An authenticated caller may see additional information. |
Supply the caller's bearer token for protected HTTP operations. For a session or twin operation, propagate the appropriate klab-scope token and the originating Runtime's klab-service ID. The service-specific examples use shell variables for these values. The reference Java client supplies them when the call uses the proper scope. Check instance-specific request schemas in its generated OpenAPI document at /v3/api-docs where enabled. Scope reference
Jobs¶
Some web operations return a numeric job ID. Keep the submitting service root, identity and scope together. On that same service, GET /jobs/status/{id} reports states including WAITING, FINISHED, ABORTED, INTERRUPTED and EMPTY. After FINISHED, GET /jobs/retrieve/{id} returns the serialized result. A job ID has a shorter lifetime than a committed observation. Retain the observation and twin identifiers for later scientific use.
Configuration¶
The service startup options select a work directory (-dataDir, normally ~/.klab), port (-port) and URL context path (-contextPath). Each service maintains its own configuration under services/<type>/ in the work directory. Its named YAML file and persisted settings.properties have different owners. The YAML describes that provider's configuration. The settings mechanism exposes the settings and actions offered by the running instance.
For an authorized administrator, GET /settings returns the available settings. POST /set/{setting} accepts a JSON value of the setting's declared type and returns a job ID. Check the job and reread the effective value. A saved file alone gives no assurance that a running instance applied a change. The following pages identify the relevant settings and startup configuration for each service.
The shared contract lists additional projections, export formats, job operations and administration facilities. Common service contracts · ServicesAPI path definitions