Gets an OpenAPI Description of Nureva's local APIs in JSON format (refer to the OpenAPI Specification for the schema). The top level paths property contains relative paths for each endpoint. Each path has been extended to include an optional x-nureva
property that contains a Nureva Extension Object, providing additional information about the endpoint.
Nureva Extension Object
Field name | Type | Description |
---|---|---|
minimumRoleRequired | string or null | This is a string representing the minimum role required to be authorized to use this endpoint. If null, the endpoint does not require a role. |
requirements | Requirement Object or null | Device requirements that must be met to use this endpoint. If null, this endpoint does not have any requirements and is always supported by the device. |
requirementsFailed | Requirement Object or null | Device requirements that have not been met for this endpoint. If null, this endpoint is supported by the device. |
capabilities | Capabilities Object or null | An object that describes the requirements for specific attributes or functionality within an endpoint. If null, specific endpoint functionality is not affected by the state of the device. |
Requirement Object
Field name | Type | Description |
---|---|---|
minimumFirmware | string or null | The minimum firmware version required. The firmware version of the device must be greater than or equal to the minimum firmware version to meet this requirement. If null, there is no requirement for firmware version. |
minimumBars | number or null | The minimum number of bars required. The number of bars connected to the device must be greater than or equal to the minimum bars to meet this requirement. If null, there is no requirement for number of bars. |
supportedDeviceTypes | array or null | The list of supported device types that is supported for this endpoint. Possible values include: hdl310 , hdl410 . If null, then the endpoint is supported for all device types. |
Capabilities Object
Field pattern | Type | Description |
---|---|---|
{capabilityName} | Capability Item Object | One or more fields describing a capability i.e. an attribute or functionality within an endpoint. |
Capability Item Object
Field name | Type | Description |
---|---|---|
requirements | Requirement Object or null | Device requirements that must be met to use this capability. If null, this capability does not have any requirements and is always supported by this endpoint. |
requirementsFailed | Requirement Object or null | Device requirements that have not been met for this capability. If null, this capability is supported by the endpoint. |
Example Nureva Extension Object
The following example shows a Nureva Extension Object that indicates that the endpoint has no requirements since the requirements
property is missing. The endpoint requires the general
role or higher to be authorized.
{
"x-nureva": {
"minimumRoleRequired": "general"
}
}
The following example shows an endpoint that has requirements. The requirements
property has two requirements. Since the requirementsFailed
property is missing, the current state of the device meets the requirements so the endpoint is supported.
{
"x-nureva": {
"minimumRoleRequired": "general",
"requirements": {
"minimumFirmware": "1.9",
"minimumBars": 2,
"supportedDeviceTypes": ["hdl410"]
}
}
}
The following example shows an endpoint that has some requirements not met. The requirementsFailed
property is not null so this endpoint is not supported by the current state of the device. Although there are two requirements as shown in the requirements
property, the requirementsFailed
property only has one. The minimumBars
property requirement has not been met since the current state of the device has 1 bar, but the endpoint requires a minimum of 2 bars.
{
"x-nureva": {
"minimumRoleRequired": "general",
"requirements": {
"minimumFirmware": "1.9",
"minimumBars": 2,
"supportedDeviceTypes": ["hdl410"]
},
"requirementsFailed": {
"minimumBars": 1,
"supportedDeviceTypes": ["hdl310"]
}
}
}
In the following example, the requirements to use the endpoint is met. However, there is a capabilities
property which indicates that some functionality may not be supported. The capabilities
property has three capabilities. The first one has no requirements so the value is an empty object. The second capability has requirements and the current state of the device meets the requirements. The third capability has requirements but the current state of the device does not meet the requirements, which means that the third capability is not supported by the endpoint.
{
"x-nureva": {
"minimumRoleRequired": "general",
"requirements": {
"minimumFirmware": "1.9",
"minimumBars": 2,
"supportedDeviceTypes": ["hdl410"]
},
"capabilities": {
"exampleCapabilityWithNoRequirements": {},
"exampleCapabilityWithRequirements": {
"requirements": {
"minimumFirmware": "1.9"
}
},
"exampleCapabilityWithRequirementsFailed": {
"requirements": {
"minimumFirmware": "2.0"
},
"requirementsFailed": {
"minimumFirmware": "1.9"
}
}
}
}
}