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

# Internal

Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API.

## POST /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":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/status":{"post":{"tags":["internal"],"description":"Report SonarLink runtime status. This includes software version, host, and active sessions.","deprecated":true,"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 /connect

> Start a new session connecting to the given devices. Where you can, prefer \`/start\_session\` with a session plan from the SonarLink config.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/connect":{"post":{"tags":["internal"],"description":"Start a new session connecting to the given devices. Where you can, prefer `/start_session` with a session plan from the SonarLink config.","requestBody":{"required":true,"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"},"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"},"session_plan_name":{"type":["string","null"],"description":"The session plan this session was started from, if any. Missing, null, or blank: an ad-hoc session."}},"required":["devices"]}}}},"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"}}}},"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"]},"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."},"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 /update\_device\_options

> Like \`/device\_options\`, but responds with an empty body, as older SonarLinks do. Kept for compatibility.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/update_device_options":{"post":{"tags":["internal"],"deprecated":true,"description":"Like `/device_options`, but responds with an empty body, as older SonarLinks do. Kept for compatibility.","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."},"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":{}}}}}
```

## POST /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\`. Also streams the request body to the session's devices, as \`/connect\_ws\` does the messages sent on it. SonarLink handles both directions at once, but few HTTP clients can: browsers' \`fetch\` can't read the response until the request body ends, and proxies may hold the body back until then. That's why \`/connect\_ws\` is preferred: WebSocket clients, browsers included, send and receive at once.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/join":{"post":{"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`. Also streams the request body to the session's devices, as `/connect_ws` does the messages sent on it. SonarLink handles both directions at once, but few HTTP clients can: browsers' `fetch` can't read the response until the request body ends, and proxies may hold the body back until then. That's why `/connect_ws` is preferred: WebSocket clients, browsers included, send and receive at once.","tags":["internal"],"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 /start\_discovery

> Attempt to find all devices both on the local network and attached as serial devices. Results are collected asynchronously and can be retrieved with \`/get\_discovery\_data\`. Prefer \`/discover\_devices\`.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/start_discovery":{"post":{"tags":["internal"],"description":"Attempt to find all devices both on the local network and attached as serial devices. Results are collected asynchronously and can be retrieved with `/get_discovery_data`. Prefer `/discover_devices`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hosts":{"type":"array","items":{"type":"string"}},"check_com_ports":{"type":"boolean"}}}}}},"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 /get\_discovery\_data

> Retrieve the current discovery results as a list of devices. Requires first calling \`/start\_discovery\`.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/get_discovery_data":{"post":{"tags":["internal"],"description":"Retrieve the current discovery results as a list of devices. Requires first calling `/start_discovery`.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"product_id":{"$ref":"#/components/schemas/ProductId"},"connectable":{"type":"boolean"}},"required":["url"],"additionalProperties":{}},"description":"Devices found by discovery so far."}}}},"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"]}}}}
```

## POST /setip

> Broadcast a message to all hosts on the local network. Typically used to send commands to a device that might be needed even if the device has an invalid IP address (e.g. setting device self-assigned IP addresses, rebooting)

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/setip":{"post":{"tags":["internal"],"description":"Broadcast a message to all hosts on the local network. Typically used to send commands to a device that might be needed even if the device has an invalid IP address (e.g. setting device self-assigned IP addresses, rebooting)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"port":{"type":"number","exclusiveMinimum":0},"msg":{"type":"string","minLength":1}},"required":["port","msg"]}}}},"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 /diagnostics

> Technical information about the server process and underlying system.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/diagnostics":{"get":{"tags":["internal"],"description":"Technical information about the server process and underlying system.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{},"description":"Server process and system information. The exact keys are not stable."}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## POST /probe\_url

> Check whether a URL is reachable.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/probe_url":{"post":{"tags":["internal"],"description":"Check whether a URL is reachable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["reachable","unreachable","skipped"]},"reason":{"type":"string","description":"Why the URL is unreachable or was skipped."}},"required":["status"],"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"}}}},"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 /relay\_sftp

> Relay a file to a remote host via SFTP. Used for sending new firmware to the Omniscan 3D.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/relay_sftp":{"post":{"tags":["internal"],"description":"Relay a file to a remote host via SFTP. Used for sending new firmware to the Omniscan 3D.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string","minLength":1},"remote_path":{"type":"string","minLength":1},"file_data_base64":{"type":"string","minLength":1}},"required":["host","remote_path","file_data_base64"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"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"}}}},"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 /get\_or\_create\_config

> Return the SonarLink config file, creating it if absent.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/get_or_create_config":{"post":{"tags":["internal"],"description":"Return the SonarLink config file, creating it if absent.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"type":"string"}},"required":["schema_version"],"additionalProperties":{},"description":"A SonarLink config file."}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## POST /update\_config

> Write a new config and return the updated file.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/update_config":{"post":{"tags":["internal"],"description":"Write a new config and return the updated file.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{}}}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"type":"string"}},"required":["schema_version"],"additionalProperties":{},"description":"A SonarLink config file."}}}},"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 /get\_file\_by\_dir

> Return the SonarLink config file found under the given directory.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/get_file_by_dir":{"post":{"tags":["internal"],"description":"Return the SonarLink config file found under the given directory.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"type":"string"}},"required":["schema_version"],"additionalProperties":{},"description":"A SonarLink config file."}}}},"204":{"description":"There is no config file under that directory."},"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 /get\_default\_config

> Return the built-in default config.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/get_default_config":{"post":{"tags":["internal"],"description":"Return the built-in default config.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"type":"string"}},"required":["schema_version"],"additionalProperties":{},"description":"A SonarLink config file."}}}},"500":{"description":"An unexpected error in SonarLink.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## POST /check\_directory\_accessible

> Check whether the server has permission to write to a given directory.

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/check_directory_accessible":{"post":{"tags":["internal"],"description":"Check whether the server has permission to write to a given directory.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dir":{"type":"string"}},"required":["dir"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"boolean","description":"Whether the server can write to the directory."}}}},"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 /errlog\_ws

> Start a WebSocket connection to send client error logs to the server

```json
{"openapi":"3.1.0","info":{"title":"SonarLink HTTP API","version":"1.15.0-dev.17"},"tags":[{"name":"internal","description":"Endpoints used by SonarView, not recommended for use in other applications. If you need to use any of these, please drop us a line so we can improve the API."}],"servers":[{"url":"/","description":"The SonarLink instance serving this page"}],"paths":{"/errlog_ws":{"get":{"tags":["internal"],"description":"Start a WebSocket connection to send client error logs to the server","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":{}}}}}
```
