> For the complete documentation index, see [llms.txt](https://docs.ceruleansonar.com/c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ceruleansonar.com/c/sonarview/sonarlink/models.md).

# Models

## The SessionId object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"SessionId":{"type":"integer","minimum":0,"description":"Identifier of an active session."}}}}
```

## The DeviceOptions object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"DeviceOptions":{"type":"object","properties":{},"additionalProperties":{},"description":"Device-specific options. The exact keys vary by product."}}}}
```

## The DeviceId object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"DeviceId":{"type":"integer","minimum":0,"maximum":255,"description":"Identifier of a device within a session. Used for disambiguating which device a message came from or is going to."}}}}
```

## The ProductId object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"ProductId":{"type":"string","description":"What product is this device?","enum":["dvl75","gps","insight240","mbes24016","nmea_out","os3d45016","os450","os450c","p360","ping","rovl","s500","tracker650","ydnu-02"]}}}}
```

## The ConnectionStatus object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"ConnectionStatus":{"type":"string","enum":["PENDING","CONNECTED","CLOSED"],"description":"Connection status of a device or platform within a session."}}}}
```

## The SessionPlatform object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"SessionPlatform":{"type":["object","null"],"properties":{"protocol":{"type":["string","null"],"enum":["mavlink2rest","chasing","blueye","deeptrekker","qysea",null],"default":null,"description":"What type of vehicle is this, for communication purposes."},"url":{"type":"string","format":"uri","description":"How to connect to the vehicle? Acceptable values depend on the value of `protocol`"},"options":{"type":["object","null"],"properties":{},"additionalProperties":{},"description":"Opaque, platform-specific options. Acceptable values depend on the value of `protocol`"},"model":{"type":"string","description":"How to visually portray the vehicle"},"nickname":{"type":["string","null"]},"device_id":{"$ref":"#/components/schemas/DeviceId"},"status":{"$ref":"#/components/schemas/ConnectionStatus"}},"additionalProperties":{},"description":"The platform (vehicle) as reported within an active session, with its connection status."},"DeviceId":{"type":"integer","minimum":0,"maximum":255,"description":"Identifier of a device within a session. Used for disambiguating which device a message came from or is going to."},"ConnectionStatus":{"type":"string","enum":["PENDING","CONNECTED","CLOSED"],"description":"Connection status of a device or platform within a session."}}}}
```

## The ValidationError object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"ValidationError":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."},"issues":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}},"description":"Request type validation issues."}},"required":["error","issues"],"additionalProperties":{}}}}}
```

## The Error object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## The PlatformSpec object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"PlatformSpec":{"type":["object","null"],"properties":{"protocol":{"type":["string","null"],"enum":["mavlink2rest","chasing","blueye","deeptrekker","qysea",null],"default":null,"description":"What type of vehicle is this, for communication purposes."},"url":{"type":"string","format":"uri","description":"How to connect to the vehicle? Acceptable values depend on the value of `protocol`"},"options":{"type":["object","null"],"properties":{},"additionalProperties":{},"description":"Opaque, platform-specific options. Acceptable values depend on the value of `protocol`"},"model":{"type":"string","description":"How to visually portray the vehicle"}},"additionalProperties":{},"description":"The platform (vehicle) a session is attached to."}}}}
```

## The SessionPlan object

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"components":{"schemas":{"SessionPlan":{"type":"object","properties":{"session_plan_name":{"type":"string","minLength":1,"description":"The nickname of a session plan."},"devices":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"product_id":{"$ref":"#/components/schemas/ProductId"},"device_id":{"$ref":"#/components/schemas/DeviceId"},"nickname":{"type":"string"},"options":{"$ref":"#/components/schemas/DeviceOptions"},"init_hex":{"type":"string","description":"Deprecated. Hex-encoded bytes to send the device once connected, and again whenever it reconnects - but only for a product SonarLink doesn't set up itself from `options`; for the others it's ignored.","deprecated":true}},"required":["url","product_id"],"additionalProperties":{},"description":"A device to connect to within a session."}},"platform":{"$ref":"#/components/schemas/PlatformSpec"},"is_active":{"type":"boolean","description":"Whether a session started from this plan is running."}},"required":["session_plan_name","devices","platform","is_active"],"additionalProperties":{},"description":"A session plan from the SonarLink config, with its devices and platform as `/start_session` would connect to them."},"ProductId":{"type":"string","description":"What product is this device?","enum":["dvl75","gps","insight240","mbes24016","nmea_out","os3d45016","os450","os450c","p360","ping","rovl","s500","tracker650","ydnu-02"]},"DeviceId":{"type":"integer","minimum":0,"maximum":255,"description":"Identifier of a device within a session. Used for disambiguating which device a message came from or is going to."},"DeviceOptions":{"type":"object","properties":{},"additionalProperties":{},"description":"Device-specific options. The exact keys vary by product."},"PlatformSpec":{"type":["object","null"],"properties":{"protocol":{"type":["string","null"],"enum":["mavlink2rest","chasing","blueye","deeptrekker","qysea",null],"default":null,"description":"What type of vehicle is this, for communication purposes."},"url":{"type":"string","format":"uri","description":"How to connect to the vehicle? Acceptable values depend on the value of `protocol`"},"options":{"type":["object","null"],"properties":{},"additionalProperties":{},"description":"Opaque, platform-specific options. Acceptable values depend on the value of `protocol`"},"model":{"type":"string","description":"How to visually portray the vehicle"}},"additionalProperties":{},"description":"The platform (vehicle) a session is attached to."}}}}
```
