> 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/public.md).

# Public

These endpoints are recommended for developer use and SonarLink automation.

## GET /status

> Report SonarLink runtime status. This includes software version, host, and active sessions.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/status":{"get":{"tags":["public"],"description":"Report SonarLink runtime status. This includes software version, host, and active sessions.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"sonarlink_version":{"type":"string"},"os_hostname":{"type":"string"},"sessions":{"type":"array","items":{"type":"object","properties":{"session_id":{"$ref":"#/components/schemas/SessionId"},"session_uptime":{"type":"number","description":"Seconds since the session started."},"session_devices":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"options":{"$ref":"#/components/schemas/DeviceOptions"},"device_id":{"$ref":"#/components/schemas/DeviceId"},"product_id":{"$ref":"#/components/schemas/ProductId"},"nickname":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/ConnectionStatus"}},"additionalProperties":{},"description":"A device as reported within an active session."}},"session_platform":{"$ref":"#/components/schemas/SessionPlatform"},"session_clients":{"type":"array","items":{"description":"Clients connected to SonarLink - typically live viewing sessions"}},"session_plan_name":{"type":["string","null"]},"is_recording":{"type":"boolean","default":false}},"required":["session_id","session_uptime","session_devices","session_clients"],"additionalProperties":{},"description":"A snapshot of one active session."}},"serial_okay":{"type":"boolean","description":"Can SonarLink enumerate and connect to USB devices?"},"cerulean_internal":{"type":"boolean","enum":[true],"description":"Is Sonarlink running with internal development/troubleshooting features enabled?"}},"required":["sonarlink_version","os_hostname","sessions","serial_okay"],"additionalProperties":{}}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"SessionId":{"type":"integer","minimum":0,"description":"Identifier of an active session."},"DeviceOptions":{"type":"object","properties":{},"additionalProperties":{},"description":"Device-specific options. The exact keys vary by product."},"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."},"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"]},"ConnectionStatus":{"type":"string","enum":["PENDING","CONNECTED","CLOSED"],"description":"Connection status of a device or platform within a session."},"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."}}}}
```

## POST /logging

> Start or stop capturing data from a session into a svlog or svlz file.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/logging":{"post":{"tags":["public"],"description":"Start or stop capturing data from a session into a svlog or svlz file.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"session":{"anyOf":[{"type":"string","minLength":1,"description":"The nickname of a session plan."},{"type":"integer","minimum":0,"description":"Identifier of an active session."}],"description":"An active session: the name of the session plan it was started from, or its id."},"session_id":{"type":"integer","minimum":0,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given.","deprecated":true},"enable":{"type":"boolean","description":"True to start logging, false to stop."},"subpath":{"type":["string","null"],"description":"The destination directory name, when enabling logging. Defaults to the session plan's name, or else the first device's product name."}},"required":["session","enable"]}}}},"responses":{"200":{"description":"Success."},"400":{"description":"The request body failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"415":{"description":"The request body was not sent as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"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":{}},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## GET /session\_plans

> List the session plans set up in SonarView's Session Configurations. Each is a named set of devices, and optionally a vehicle, that \`/start\_session\` can start a session from.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/session_plans":{"get":{"tags":["public"],"description":"List the session plans set up in SonarView's Session Configurations. Each is a named set of devices, and optionally a vehicle, that `/start_session` can start a session from.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/SessionPlan"}}},"required":["plans"],"additionalProperties":{}}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"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."}}}}
```

## POST /start\_session

> Start a session from a session plan, connecting to its devices and vehicle just as SonarView does. If a session from that plan is already running, responds with that one instead.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/start_session":{"post":{"tags":["public"],"description":"Start a session from a session plan, connecting to its devices and vehicle just as SonarView does. If a session from that plan is already running, responds with that one instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"session_plan_name":{"type":"string","minLength":1,"description":"The nickname of a session plan."}},"required":["session_plan_name"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"$ref":"#/components/schemas/SessionId"},"is_recording":{"type":"boolean"}},"required":["session_id"],"additionalProperties":{}}}}},"400":{"description":"The request body failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"415":{"description":"The request body was not sent as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"There is no session plan by that name, or it is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"SessionId":{"type":"integer","minimum":0,"description":"Identifier of an active session."},"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":{}},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## POST /end\_session

> End an active session, given its id or the session plan it was started from.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/end_session":{"post":{"tags":["public"],"description":"End an active session, given its id or the session plan it was started from.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"session":{"anyOf":[{"type":"string","minLength":1,"description":"The nickname of a session plan."},{"type":"integer","minimum":0,"description":"Identifier of an active session."}],"description":"An active session: the name of the session plan it was started from, or its id."},"session_id":{"type":"integer","minimum":0,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given.","deprecated":true}},"required":["session"]}}}},"responses":{"200":{"description":"Success."},"400":{"description":"The request body failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"415":{"description":"The request body was not sent as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"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":{}},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## POST /device\_options

> Update some of a device's options within an active session - such as range, gain, and whether it is pinging - and apply them to the device. Options not given keep their values, and options SonarLink doesn't recognize are kept as-is. Responds with the device's options after the update.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/device_options":{"post":{"tags":["public"],"description":"Update some of a device's options within an active session - such as range, gain, and whether it is pinging - and apply them to the device. Options not given keep their values, and options SonarLink doesn't recognize are kept as-is. Responds with the device's options after the update.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"session":{"anyOf":[{"type":"string","minLength":1,"description":"The nickname of a session plan."},{"type":"integer","minimum":0,"description":"Identifier of an active session."}],"description":"An active session: the name of the session plan it was started from, or its id."},"session_id":{"type":"integer","minimum":0,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given.","deprecated":true},"device_id":{"$ref":"#/components/schemas/DeviceId"},"options":{"$ref":"#/components/schemas/DeviceOptions"}},"required":["session","device_id","options"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOptions"}}}},"400":{"description":"The request body failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"415":{"description":"The request body was not sent as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request references a session or device that does not exist, or the options, merged with the device's, are not valid for it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"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."},"DeviceOptions":{"type":"object","properties":{},"additionalProperties":{},"description":"Device-specific options. The exact keys vary by product."},"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":{}},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## GET /join

> Stream a live session's packets, in the svlog packet format \`.svlog\` files store, for as long as the connection stays open. The session's current \`SONARLINK\_JSON\` state packet is sent first. Prefer \`/connect\_ws\`.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/join":{"get":{"description":"Stream a live session's packets, in the svlog packet format `.svlog` files store, for as long as the connection stays open. The session's current `SONARLINK_JSON` state packet is sent first. Prefer `/connect_ws`.","tags":["public"],"parameters":[{"schema":{"type":"string","description":"An active session: the name of the session plan it was started from, or its id. A value of only digits is taken as an id."},"required":true,"description":"An active session: the name of the session plan it was started from, or its id. A value of only digits is taken as an id.","name":"session","in":"query"},{"schema":{"type":"integer","minimum":0,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given."},"required":false,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given.","deprecated":true,"name":"session_id","in":"query"}],"responses":{"200":{"description":"The session's packets, until the connection closes.","content":{"application/x-cerulean-svlog":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The query string failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"422":{"description":"The request references a session that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"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":{}},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## POST /discover\_devices

> Find the devices on the local network and serial ports, and list them once they have had \`wait\_s\` seconds to answer. The URLs listed are what a session or session plan connects to.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/discover_devices":{"post":{"tags":["public"],"description":"Find the devices on the local network and serial ports, and list them once they have had `wait_s` seconds to answer. The URLs listed are what a session or session plan connects to.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wait_s":{"type":"number","minimum":0,"maximum":10,"default":2,"description":"How long to wait for devices to answer, in seconds. The default gives serial devices, which have 0.7 s to answer, and slow networks time to."},"hosts":{"type":"array","items":{"type":"string"},"description":"Addresses to also ask directly, for devices a broadcast doesn't reach (e.g. across a router)."}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"devices":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"product_id":{"$ref":"#/components/schemas/ProductId"},"connectable":{"type":"boolean","description":"Could SonarLink reach the device at this URL?"},"variant":{"type":"string","description":"Hardware variant."},"firmware_version":{"type":"string","description":"Firmware version the device reports."}},"required":["url","product_id","connectable"],"additionalProperties":{}}}},"required":["devices"],"additionalProperties":{},"description":"The devices found on the network and serial ports."}}}},"400":{"description":"The request body failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"415":{"description":"The request body was not sent as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"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"]},"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":{}},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## GET /register\_service

> BlueOS service registration endpoint. See \[BlueOS documentation]\(<https://blueos.cloud/docs/stable/development/extensions/#web-interface-http-server>).

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/register_service":{"get":{"tags":["public"],"description":"BlueOS service registration endpoint. See [BlueOS documentation](https://blueos.cloud/docs/stable/development/extensions/#web-interface-http-server).","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"company":{"type":"string"},"version":{"type":"string"},"webpage":{"type":"string"},"api":{"type":"string"},"new_page":{"type":"boolean"},"works_in_relative_paths":{"type":"boolean"}},"required":["name","description","icon","company","version","webpage","api","new_page","works_in_relative_paths"],"additionalProperties":{},"description":"The BlueOS extension metadata."}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## GET /recent\_data

> The last few seconds of a live session's data, as \`/join\` would have streamed it and \`.svlog\` files store it, led by the session's current \`SONARLINK\_JSON\` state packet. SonarLink keeps only the most recent 16 MB or so of each session's data, so a long window may start later than asked.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/recent_data":{"get":{"tags":["public"],"description":"The last few seconds of a live session's data, as `/join` would have streamed it and `.svlog` files store it, led by the session's current `SONARLINK_JSON` state packet. SonarLink keeps only the most recent 16 MB or so of each session's data, so a long window may start later than asked.","parameters":[{"schema":{"type":"string","description":"An active session: the name of the session plan it was started from, or its id. A value of only digits is taken as an id."},"required":true,"description":"An active session: the name of the session plan it was started from, or its id. A value of only digits is taken as an id.","name":"session","in":"query"},{"schema":{"type":"integer","minimum":0,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given."},"required":false,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given.","deprecated":true,"name":"session_id","in":"query"},{"schema":{"type":"number","exclusiveMinimum":0,"default":15,"description":"How far back to go, in seconds."},"required":false,"description":"How far back to go, in seconds.","name":"duration_s","in":"query"}],"responses":{"200":{"description":"The session's recent packets.","content":{"application/x-cerulean-svlog":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The query string failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"422":{"description":"The request references a session that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"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":{}},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## GET /list\_logs

> List the recordings (svlog and svlz files) under the configured log directory. Download one with \`/log/{plan}/{filename}\`.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/list_logs":{"get":{"tags":["public"],"description":"List the recordings (svlog and svlz files) under the configured log directory. Download one with `/log/{plan}/{filename}`.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"logs":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","description":"The directory a recording is in, within the log directory: SonarLink names it after the session's plan, or else its first device's product."},"filename":{"type":"string","description":"The recording's file name."},"url":{"type":"string","description":"Where to download it: `/log/{plan}/{filename}`, each part percent-encoded."},"size":{"type":"number","minimum":0,"description":"File size in bytes."},"modified_at":{"type":"string","format":"date-time","description":"When the file was last modified."}},"required":["plan","filename","url","size","modified_at"],"additionalProperties":{}}}},"required":["logs"],"additionalProperties":{},"description":"The recordings (svlog and svlz files) under the configured log directory."}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## GET /log/{plan}/{filename}

> Download a recording, given its \`plan\` and \`filename\` as \`/list\_logs\` gives them - e.g. \`/log/my\_plan/2026-08-05-14-30.svlz\`.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/log/{plan}/{filename}":{"get":{"tags":["public"],"description":"Download a recording, given its `plan` and `filename` as `/list_logs` gives them - e.g. `/log/my_plan/2026-08-05-14-30.svlz`.","parameters":[{"schema":{"type":"string","description":"The directory a recording is in, within the log directory: SonarLink names it after the session's plan, or else its first device's product."},"required":true,"description":"The directory a recording is in, within the log directory: SonarLink names it after the session's plan, or else its first device's product.","name":"plan","in":"path"},{"schema":{"type":"string","description":"The recording's file name."},"required":true,"description":"The recording's file name.","name":"filename","in":"path"}],"responses":{"200":{"description":"The recording.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"There is no such recording.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`plan` and `filename` don't name a recording in the log directory.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```

## GET /errlog

> Return the SonarLink error log as JSON lines.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/errlog":{"get":{"tags":["public"],"description":"Return the SonarLink error log as JSON lines.","responses":{"200":{"description":"The error log, one JSON object per line.","content":{"application/x-json-lines":{"schema":{"type":"string"}}}},"500":{"description":"An unexpected error in SonarLink."}}}}}}
```

## GET /connect\_ws

> Start a bidirectional WebSocket connection to interact with a session, given its id or the session plan it was started from.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"public","description":"These endpoints are recommended for developer use and SonarLink automation."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/connect_ws":{"get":{"tags":["public"],"description":"Start a bidirectional WebSocket connection to interact with a session, given its id or the session plan it was started from.","parameters":[{"schema":{"type":"string","description":"An active session: the name of the session plan it was started from, or its id. A value of only digits is taken as an id."},"required":true,"description":"An active session: the name of the session plan it was started from, or its id. A value of only digits is taken as an id.","name":"session","in":"query"},{"schema":{"type":"integer","minimum":0,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given."},"required":false,"description":"Deprecated: use `session`. Identifier of an active session, used when `session` isn't given.","deprecated":true,"name":"session_id","in":"query"},{"schema":{"type":"string","description":"Present and non-empty to also send data to the session’s devices."},"required":false,"description":"Present and non-empty to also send data to the session’s devices.","name":"write","in":"query"}],"responses":{"101":{"description":"The connection was upgraded to a WebSocket."},"426":{"description":"The request was a plain HTTP request - expected WebSocket connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message."}},"required":["error"],"additionalProperties":{}}}}}
```
