API Reference
All Runner and Session communication uses NATS request-reply messaging. This document defines the complete set of endpoints, their request/response types, and the data transfer objects (DTOs) used on the wire.
All messages are JSON-serialized. Understanding how different types are encoded on the wire is essential for correct usage:
- Object types (e.g.,
Image, SetSettingsRequest) are sent as JSON objects: {"Name": "...", "Packages": [...]}
- String values are sent as JSON string literals. For example,
SetTestPlanXML expects a JSON-encoded string containing the XML content. The XML must be wrapped in double quotes with proper JSON escaping:
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TestPlan type=\"OpenTap.TestPlan\">..."
- Guid values are sent as JSON string literals in standard format:
"a8a9baa6-d3b0-446d-a3e2-07bbf9310a71"
- NoInput is sent as an empty JSON object:
{}
- NoResponse is returned as an empty JSON object:
{}
- Errors from the server are returned as NATS error responses with an
OpenTapNatsError header. Fatal errors (e.g., invalid input, server exceptions) are communicated this way rather than in the response body.
Runner APIs
The {base} is in the form of: OpenTap.Runner.{RunnerId}.Request
Session APIs
The {base} is in the form of: OpenTap.Runner.{RunnerId}.Session.{SessionId}.Request
Endpoint Details
SetTestPlanXML
The String request for SetTestPlanXML must contain valid OpenTAP test plan XML (.TapPlan format). The XML content is JSON-encoded as a string literal on the wire (see Wire Format).
The List of String response contains non-fatal deserialization warnings from the OpenTAP serializer. For example, a missing plugin type or a package version mismatch will appear as a string in this list. An empty list means the test plan loaded without issues.
Fatal errors (e.g., invalid XML, corrupt data, or a test plan already executing) are returned as NATS error responses, not in the response body.
Example using the NATS CLI:
nats req OpenTap.Runner.{RunnerId}.Session.{SessionId}.Request.SetTestPlanXML '"<?xml version=\"1.0\" encoding=\"utf-8\"?><TestPlan type=\"OpenTap.TestPlan\"><Steps /></TestPlan>"'
Data Types
Empty JSON object {}.
For example, the Session endpoint to abort a test plan takes a NoInput:
nats req OpenTap.Runner.{RunnerId}.Session.{SessionId}.Request.AbortTestPlan "{}"
NoResponse
Empty JSON object {}.
For example, the Session endpoint to abort a test plan returns a NoResponse:
nats req OpenTap.Runner.{RunnerId}.Session.{SessionId}.Request.AbortTestPlan "{}" returns {}.
RunnerStatus
| Property |
Type |
| RemoteConnection |
RemoteConnection |
| Version |
String |
| RunningAsService |
Boolean |
| RunningInContainer |
Boolean |
| AutoUpdateDisabled |
Boolean |
| AllowParallelRuns |
Boolean |
| Hostname |
String |
| IpAddress |
String |
| StreamInfo |
StreamInfoStatus |
RemoteConnection
| Property |
Type |
| Endpoint |
String |
| Connected |
Boolean |
| Rtt |
String |
StreamInfoStatus
| Property |
Type |
| RunsMaxBytes |
Int64 |
| RunsUsage |
Int64 |
| DiskFree |
Int64 |
Image
| Property |
Type |
| Name |
String |
| Packages |
List of PackageSpecifier |
| Repositories |
List of String |
| Id |
String |
Session
| Property |
Type |
| Subject |
String |
| Id |
Guid |
| ImageId |
String |
| SessionState |
SessionState |
| TestPlanRunId |
String |
| StartedBy |
String |
| Metadata |
Dictionary of String to String |
SessionState
Enum with the following values:
Idle
Loading
Executing
Breaking
Aborting
WaitingForUserInput
RunStatus
| Property |
Type |
| SessionId |
Guid |
| Verdict |
Verdict |
| TestPlanRunId |
Guid (nullable) |
| FailedToStart |
Boolean |
| SessionState |
SessionState |
| ExecutingSteps |
List of Guid |
EditStatus
| Property |
Type |
| TestPlanDirty |
Boolean |
| UndoBufferSize |
Int32 |
| RedoBufferSize |
Int32 |
ErrorResponse
Returned by endpoints such as LoadComponentSettingsFromRepository. Represents a structured error with optional nested inner errors.
| Property |
Type |
| Type |
String |
| Message |
String |
| Parameter |
String (nullable) |
| Source |
String (nullable) |
| StackTrace |
String (nullable) |
| Inner |
ErrorResponse (nullable) |
NewSessionRequest
NewSessionResponse
DefaultSessionRequest
RegisterSessionRequest
| Property |
Type |
| SessionId |
Guid |
| ProcessId |
Int32 |
| ExpectedRunnerVersion |
String |
| Operator |
String |
| Metadata |
Dictionary of String to String |
RegisterSessionResponse
| Property |
Type |
| Success |
Boolean |
| Message |
String |
| Url |
String |
| AccessToken |
String |
| OperatorId |
String |
| SettingsFileLocation |
String |
| TestPlan |
RepositoryPackageReference |
| Settings |
Settings |
| RunTestPlan |
Boolean |
| Parameters |
List of Parameter |
| ShutdownOnComplete |
Boolean |
SaveDefaultSettings
| Property |
Type |
| SessionId |
Guid |
| Repository |
String |
Note: Repository is accepted by the client library for forward-compatibility but is currently ignored by the server.
RunnerUpdateRequest
| Property |
Type |
| UpdateTo |
String |
RunnerUpdateResponse
| Property |
Type |
| Success |
Boolean |
| ErrorMessage |
String |
GetSettingsRequest
| Property |
Type |
| ContextId |
Guid |
GetTestPlanReferenceResponse
SaveTestPlanToRepositoryResponse
MoveRequest
| Property |
Type |
| StepIds |
List of Guid |
| TargetStepId |
Guid |
DeleteRequest
| Property |
Type |
| StepIds |
List of Guid |
Parameter
| Property |
Type |
| Group |
String |
| Name |
String |
| Value |
String |
| TypeCode |
TypeCode |
EnableMetricsPollingRequest
| Property |
Type |
| Enabled |
Boolean |
EnableMetricsPollingResponse
| Property |
Type |
| JetStreamName |
String |
| Enabled |
Boolean |
AssetDiscoveryResponse
AssetDiscoveryResult
| Property |
Type |
| DiscoveredAssets |
List of DiscoveredAsset |
| Priority |
Double |
| Name |
String |
| IsSuccess |
Boolean |
| Error |
String |
DiscoveredAsset
| Property |
Type |
| Manufacturer |
String |
| Model |
String |
| AssetIdentifier |
String |
SetComponentSettingsRequest
ComponentSettingsBase
| Property |
Type |
| Name |
String |
| GroupName |
String |
ComponentSettingsIdentifier
Extends ComponentSettingsBase. Returned by GetComponentSettingsOverview to identify available component settings without loading their full configuration.
| Property |
Type |
| Name |
String |
| GroupName |
String |
GetComponentSettingsRequest
| Property |
Type |
| GroupName |
String |
| Name |
String |
GetComponentSettingsListItemRequest
| Property |
Type |
| Index |
Int32 |
| GroupName |
String |
| Name |
String |
ComponentSettingsListItem
SetComponentSettingsListItemRequest
GetComponentSettingDataGridRequest
| Property |
Type |
| PropertyName |
String |
| Index |
Int32 |
| GroupName |
String |
| Name |
String |
DataGridControl
SetComponentSettingDataGridRequest
| Property |
Type |
| DataGridControl |
DataGridControl |
| PropertyName |
String |
| Index |
Int32 |
| GroupName |
String |
| Name |
String |
AddComponentSettingDataGridItemTypeRequest
| Property |
Type |
| TypeName |
String |
| PropertyName |
String |
| Index |
Int32 |
| GroupName |
String |
| Name |
String |
UploadFileRequest
| Property |
Type |
| File |
Byte[] |
| FileName |
String |
DownloadTapSettingsRequest
| Property |
Type |
| GroupName |
String |
RepositoryPackageReference
| Property |
Type |
| Version |
String |
| Path |
String |
| PathId |
String |
RepositorySettingsPackageDefinition
| Property |
Type |
| Name |
String |
| Tags |
List of String |
| Version |
String |
| Path |
String |
| PathId |
String |
AddComponentSettingsListItemRequest
| Property |
Type |
| TypeName |
String |
| GroupName |
String |
| Name |
String |
CopyRequest
| Property |
Type |
| StepIds |
List of Guid |
PasteRequest
| Property |
Type |
| TargetStepId |
Guid |
| Clipboard |
String |
PackageSpecifier
| Property |
Type |
| Name |
String |
| Version |
String |
| Architecture |
String |
| OS |
String |
Settings
A JSON array of Setting objects. Serialized as [{...}, {...}, ...].
VisualStatus
| Property |
Type |
| IsReadOnly |
Boolean |
| IsVisible |
Boolean |
| IsEnabled |
Boolean |
UnitAttribute
| Property |
Type |
| Unit |
String |
| PreScaling |
Double |
| StringFormat |
String |
| UseRanges |
Boolean |
| UseEngineeringPrefix |
Boolean |
DisplayAttribute
| Property |
Type |
| Description |
String |
| Group |
List of String |
| Name |
String |
| Order |
Double |
| Collapsed |
Boolean |
| Property |
Type |
| Name |
String |
| MacroName |
String |
| Group |
String |
| Frozen |
Boolean |
ExternalParameter
| Property |
Type |
| Name |
String |
Layout
| Property |
Type |
| Mode |
LayoutMode |
| RowHeight |
Int32 |
| MaxRowHeight |
Int32 |
ListItemType
Represents a selectable type in a component settings list or data grid.
ColumnDisplayName
| Property |
Type |
| ColumnName |
String |
| Order |
Double |
| IsReadOnly |
Boolean |
Icon
| Property |
Type |
| IconName |
String |
| Invoke |
Boolean (nullable) |
| StepReference |
Guid (nullable) |
| PropertyReference |
String |
Setting
RepositoryPackageDefinition
| Property |
Type |
| Name |
String |
| Tags |
List of String |
| Version |
String |
| Path |
String |
| PathId |
String |
TestPlan
| Property |
Type |
| ChildTestSteps |
List of TestStep |
| Settings |
Settings |
| IsOpen |
Boolean |
| PropertiesToInclude |
List of String |
| Id |
Guid |
SetSettingsRequest
| Property |
Type |
| ContextId |
Guid |
| Settings |
Settings |
TestPlanValidationErrors
A JSON array of TestStepValidationError objects.
CommonSettings
| Property |
Type |
| Step |
TestStep |
| StepIds |
List of Guid |
CommonStepSettingsContext
CommonContext
| Property |
Type |
| ContextItems |
List of Setting |
| StepIds |
List of Guid |
Interaction
| Property |
Type |
| Timeout |
String |
| Title |
String |
| Modal |
Boolean |
| Settings |
Settings |
| Id |
Guid |
PropertyReferenceRequest
| Property |
Type |
| ContextId |
Guid |
| PropertyName |
String |
ProfileGroup
Represents a group of component settings profiles.
| Property |
Type |
| Profiles |
List of String |
| CurrentProfile |
String |
| GroupName |
String |
| Property |
Type |
| ContextId |
Guid |
| PropertyName |
String |
| ContextMenu |
List of Setting |
SetDataGridRequest
| Property |
Type |
| ContextId |
Guid |
| PropertyName |
String |
| DataGridControl |
DataGridControl |
AddDataGridItemTypeRequest
| Property |
Type |
| ContextId |
Guid |
| PropertyName |
String |
| TypeName |
String |
BreakPoints
| Property |
Type |
| TestSteps |
List of Guid |
GetSessionLogsRequest
| Property |
Type |
| Levels |
List of Int32 |
| ExcludedSources |
List of String |
| FilterText |
String |
| Offset |
Int32 |
| Limit |
Int32 |
LogList
| Property |
Type |
| Logs |
List of LogEntry |
| Offset |
Int32 |
| FilteredCount |
Int32 |
| TotalCount |
Dictionary of String to Int32 |
GetSessionSearchRequest
| Property |
Type |
| Levels |
List of Int32 |
| ExcludedSources |
List of String |
| FilterText |
String |
| SearchText |
String |
WatchDog
| Property |
Type |
| InactiveSeconds |
Double |
| TerminationTimeout |
Int32 |
TestStep
| Property |
Type |
| Id |
Guid |
| ChildTestSteps |
List of TestStep |
| IsChildTestStepsReadOnly |
Boolean |
| IsReadOnly |
Boolean |
| Settings |
Settings |
| TypeName |
String |
| TypeDisplay |
DisplayAttribute |
| Name |
String |
| ExpandedName |
String |
TestStepType
Extends TestStep. Returned by GetStepTypes to describe an available test step type and its allowed children.
| Property |
Type |
| Id |
Guid |
| ChildTestSteps |
List of TestStep |
| IsChildTestStepsReadOnly |
Boolean |
| IsReadOnly |
Boolean |
| Settings |
Settings |
| TypeName |
String |
| TypeDisplay |
DisplayAttribute |
| Name |
String |
| ExpandedName |
String |
| AvailableChildrenTypes |
List of String |
TestStepValidationError
LogEntry
| Property |
Type |
| Source |
String |
| Timestamp |
Int64 |
| Message |
String |
| Level |
Int32 |
| DurationNS |
Int64 |
ValidationError
| Property |
Type |
| PropertyName |
String |
| Error |
String |
Verdict
Outcome of a test plan run. Serialized as a PascalCase string.
| Value |
Integer |
NotSet |
0 |
Pass |
1 |
Inconclusive |
2 |
Fail |
3 |
Aborted |
4 |
Error |
5 |
SlimSession
Compact session summary included in runner heartbeat events.
LayoutMode
Flags enum controlling UI layout of a setting. Values can be combined (bitwise OR).
| Value |
Integer |
Normal |
1 |
FullRow |
2 |
FloatBottom |
4 |
TypeCode
Maps to System.TypeCode. Indicates the primitive type of a Parameter value. Serialized as a PascalCase string.
| Value |
Integer |
Empty |
0 |
Object |
1 |
DBNull |
2 |
Boolean |
3 |
Char |
4 |
SByte |
5 |
Byte |
6 |
Int16 |
7 |
UInt16 |
8 |
Int32 |
9 |
UInt32 |
10 |
Int64 |
11 |
UInt64 |
12 |
Single |
13 |
Double |
14 |
Decimal |
15 |
DateTime |
16 |
String |
18 |