> For the complete documentation index, see [llms.txt](https://docs.coherence.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherence.io/2.3/hosting/self-hosting/open-api-reference/dev.md).

# Dev

Developer APIs

## GET /dev/get-log-level

> Fetches the current log level of the Replication Server.

```json
{"openapi":"3.0.4","info":{"title":"Replication Server REST API","version":"v7.0.0"},"tags":[{"name":"dev","description":"Developer APIs"}],"servers":[{"url":"http://127.0.0.1:64001","description":"Local Rooms Replication Server"},{"url":"http://127.0.0.1:32004","description":"Local World Replication Server"}],"security":[{"rs_auth":[]}],"components":{"securitySchemes":{"rs_auth":{"type":"http","scheme":"bearer"}},"schemas":{"dev.LogLevel":{"type":"object","properties":{"Level":{"$ref":"#/components/schemas/types.LogLevel"}},"required":["Level"]},"types.LogLevel":{"description":"Log level to be set for the server.","type":"string","enum":["trace","debug","info","warn","error","fatal","panic"]},"Error":{"type":"object","properties":{"error_code":{"description":"Error code indicating the type of error that occurred.","type":"string","enum":["ERR_BAD_REQUEST","ERR_INTERNAL_ERROR","ERR_RESTRICTED_MODE_CAP_REACHED","ERR_ROOMS_LIMIT_REACHED","ERR_INVALID_SCHEMA","ERR_INVALID_ROOM_LIMIT","ERR_INVALID_MAX_ENTITIES","ERR_ROOM_NOT_FOUND","ERR_HIGH_MEMORY_PRESSURE"]},"user_message":{"description":"User-friendly error message.","type":"string"}},"required":["error_code","user_message"]}}},"paths":{"/dev/get-log-level":{"get":{"tags":["dev"],"summary":"Fetches the current log level of the Replication Server.","responses":{"200":{"description":"Log level was fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dev.LogLevel"}}}},"500":{"description":"Internal Replication Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /dev/set-log-level

> Sets the log level of the Replication Server.

```json
{"openapi":"3.0.4","info":{"title":"Replication Server REST API","version":"v7.0.0"},"tags":[{"name":"dev","description":"Developer APIs"}],"servers":[{"url":"http://127.0.0.1:64001","description":"Local Rooms Replication Server"},{"url":"http://127.0.0.1:32004","description":"Local World Replication Server"}],"security":[{"rs_auth":[]}],"components":{"securitySchemes":{"rs_auth":{"type":"http","scheme":"bearer"}},"schemas":{"dev.LogLevel":{"type":"object","properties":{"Level":{"$ref":"#/components/schemas/types.LogLevel"}},"required":["Level"]},"types.LogLevel":{"description":"Log level to be set for the server.","type":"string","enum":["trace","debug","info","warn","error","fatal","panic"]},"Error":{"type":"object","properties":{"error_code":{"description":"Error code indicating the type of error that occurred.","type":"string","enum":["ERR_BAD_REQUEST","ERR_INTERNAL_ERROR","ERR_RESTRICTED_MODE_CAP_REACHED","ERR_ROOMS_LIMIT_REACHED","ERR_INVALID_SCHEMA","ERR_INVALID_ROOM_LIMIT","ERR_INVALID_MAX_ENTITIES","ERR_ROOM_NOT_FOUND","ERR_HIGH_MEMORY_PRESSURE"]},"user_message":{"description":"User-friendly error message.","type":"string"}},"required":["error_code","user_message"]}}},"paths":{"/dev/set-log-level":{"post":{"tags":["dev"],"summary":"Sets the log level of the Replication Server.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dev.LogLevel"}}},"required":true},"responses":{"200":{"description":"Log level was set successfully"},"400":{"description":"Bad request; invalid or missing parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Replication Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Prints a log message to the Replication Server log.

> This endpoint is used for testing alerts. Every log printed has an additional field (\_\_dev, true) attached.

```json
{"openapi":"3.0.4","info":{"title":"Replication Server REST API","version":"v7.0.0"},"tags":[{"name":"dev","description":"Developer APIs"}],"servers":[{"url":"http://127.0.0.1:64001","description":"Local Rooms Replication Server"},{"url":"http://127.0.0.1:32004","description":"Local World Replication Server"}],"security":[{"rs_auth":[]}],"components":{"securitySchemes":{"rs_auth":{"type":"http","scheme":"bearer"}},"schemas":{"dev.PrintLogRequest":{"type":"object","properties":{"Level":{"$ref":"#/components/schemas/types.LogLevel"},"Message":{"description":"Message to be logged.","type":"string"},"Fields":{"description":"Additional fields (key-value pairs) to be included in the log message.","type":"object","additionalProperties":{"type":"string"}}},"required":["Level","Message"]},"types.LogLevel":{"description":"Log level to be set for the server.","type":"string","enum":["trace","debug","info","warn","error","fatal","panic"]},"Error":{"type":"object","properties":{"error_code":{"description":"Error code indicating the type of error that occurred.","type":"string","enum":["ERR_BAD_REQUEST","ERR_INTERNAL_ERROR","ERR_RESTRICTED_MODE_CAP_REACHED","ERR_ROOMS_LIMIT_REACHED","ERR_INVALID_SCHEMA","ERR_INVALID_ROOM_LIMIT","ERR_INVALID_MAX_ENTITIES","ERR_ROOM_NOT_FOUND","ERR_HIGH_MEMORY_PRESSURE"]},"user_message":{"description":"User-friendly error message.","type":"string"}},"required":["error_code","user_message"]}}},"paths":{"/dev/print-log":{"post":{"tags":["dev"],"summary":"Prints a log message to the Replication Server log.","description":"This endpoint is used for testing alerts. Every log printed has an additional field (__dev, true) attached.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dev.PrintLogRequest"}}},"required":true},"responses":{"200":{"description":"Log message was printed successfully"},"400":{"description":"Bad request; invalid or missing parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Replication Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /dev/schema

> Fetches the default schema ID used by the Replication Server.

```json
{"openapi":"3.0.4","info":{"title":"Replication Server REST API","version":"v7.0.0"},"tags":[{"name":"dev","description":"Developer APIs"}],"servers":[{"url":"http://127.0.0.1:64001","description":"Local Rooms Replication Server"},{"url":"http://127.0.0.1:32004","description":"Local World Replication Server"}],"security":[{"rs_auth":[]}],"components":{"securitySchemes":{"rs_auth":{"type":"http","scheme":"bearer"}},"schemas":{"dev.SchemaIDResponse":{"type":"object","properties":{"SchemaID":{"description":"ID of the default schema used by the server.","type":"string"}},"required":["SchemaID"]},"Error":{"type":"object","properties":{"error_code":{"description":"Error code indicating the type of error that occurred.","type":"string","enum":["ERR_BAD_REQUEST","ERR_INTERNAL_ERROR","ERR_RESTRICTED_MODE_CAP_REACHED","ERR_ROOMS_LIMIT_REACHED","ERR_INVALID_SCHEMA","ERR_INVALID_ROOM_LIMIT","ERR_INVALID_MAX_ENTITIES","ERR_ROOM_NOT_FOUND","ERR_HIGH_MEMORY_PRESSURE"]},"user_message":{"description":"User-friendly error message.","type":"string"}},"required":["error_code","user_message"]}}},"paths":{"/dev/schema":{"post":{"tags":["dev"],"summary":"Fetches the default schema ID used by the Replication Server.","responses":{"200":{"description":"Schema ID was fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dev.SchemaIDResponse"}}}},"500":{"description":"Internal Replication Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /dev/kill

> Kills the Replication Server process printing stack traces of all goroutines.

```json
{"openapi":"3.0.4","info":{"title":"Replication Server REST API","version":"v7.0.0"},"tags":[{"name":"dev","description":"Developer APIs"}],"servers":[{"url":"http://127.0.0.1:64001","description":"Local Rooms Replication Server"},{"url":"http://127.0.0.1:32004","description":"Local World Replication Server"}],"security":[{"rs_auth":[]}],"components":{"securitySchemes":{"rs_auth":{"type":"http","scheme":"bearer"}}},"paths":{"/dev/kill":{"post":{"tags":["dev"],"summary":"Kills the Replication Server process printing stack traces of all goroutines.","responses":{"default":{"description":"No response due to process termination"}}}}}}
```

## POST /dev/panic

> Causes a panic in the Replication Server on a fresh goroutine. For testing purposes only.

```json
{"openapi":"3.0.4","info":{"title":"Replication Server REST API","version":"v7.0.0"},"tags":[{"name":"dev","description":"Developer APIs"}],"servers":[{"url":"http://127.0.0.1:64001","description":"Local Rooms Replication Server"},{"url":"http://127.0.0.1:32004","description":"Local World Replication Server"}],"security":[{"rs_auth":[]}],"components":{"securitySchemes":{"rs_auth":{"type":"http","scheme":"bearer"}}},"paths":{"/dev/panic":{"post":{"tags":["dev"],"summary":"Causes a panic in the Replication Server on a fresh goroutine. For testing purposes only.","responses":{"200":{"description":"Panic was triggered successfully"}}}}}}
```

## Attempts to gracefully stop the Replication Server process.

> The call will attempt to gracefully stop the Replication Server process.\
> If shutdown won't occur in the span of 2 seconds, a hard shutdown will be performed.

```json
{"openapi":"3.0.4","info":{"title":"Replication Server REST API","version":"v7.0.0"},"tags":[{"name":"dev","description":"Developer APIs"}],"servers":[{"url":"http://127.0.0.1:64001","description":"Local Rooms Replication Server"},{"url":"http://127.0.0.1:32004","description":"Local World Replication Server"}],"security":[{"rs_auth":[]}],"components":{"securitySchemes":{"rs_auth":{"type":"http","scheme":"bearer"}}},"paths":{"/dev/stop":{"post":{"tags":["dev"],"summary":"Attempts to gracefully stop the Replication Server process.","description":"The call will attempt to gracefully stop the Replication Server process.\nIf shutdown won't occur in the span of 2 seconds, a hard shutdown will be performed.","responses":{"200":{"description":"Shutdown was initiated successfully"}}}}}}
```

## POST /dev/set-health

> Sets the health status of the Replication Server.

```json
{"openapi":"3.0.4","info":{"title":"Replication Server REST API","version":"v7.0.0"},"tags":[{"name":"dev","description":"Developer APIs"}],"servers":[{"url":"http://127.0.0.1:64001","description":"Local Rooms Replication Server"},{"url":"http://127.0.0.1:32004","description":"Local World Replication Server"}],"security":[{"rs_auth":[]}],"components":{"securitySchemes":{"rs_auth":{"type":"http","scheme":"bearer"}},"schemas":{"dev.SetHealthRequest":{"type":"object","properties":{"Healthy":{"description":"Health status to be set for the server.","type":"boolean"}},"required":["Healthy"]},"Error":{"type":"object","properties":{"error_code":{"description":"Error code indicating the type of error that occurred.","type":"string","enum":["ERR_BAD_REQUEST","ERR_INTERNAL_ERROR","ERR_RESTRICTED_MODE_CAP_REACHED","ERR_ROOMS_LIMIT_REACHED","ERR_INVALID_SCHEMA","ERR_INVALID_ROOM_LIMIT","ERR_INVALID_MAX_ENTITIES","ERR_ROOM_NOT_FOUND","ERR_HIGH_MEMORY_PRESSURE"]},"user_message":{"description":"User-friendly error message.","type":"string"}},"required":["error_code","user_message"]}}},"paths":{"/dev/set-health":{"post":{"tags":["dev"],"summary":"Sets the health status of the Replication Server.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dev.SetHealthRequest"}}},"required":true},"responses":{"200":{"description":"Health status was set successfully"},"400":{"description":"Bad request; invalid or missing parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Replication Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherence.io/2.3/hosting/self-hosting/open-api-reference/dev.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
