Skip to content

Debug API

Will Hunt edited this page Dec 9, 2019 · 10 revisions

Documentation for the Debug API

(This section is a work in progress)

The Debug API allows administrators of a bridge to control the IRC bridge without having to restart the bridge, as well as perform maintenance functions such as cleaning up idle users or inspecting connected users.

All these endpoints presume you have access to the bridge and it's as_token.

Endpoints

GET /inspectUsers?regex={userRegex}

Request Parameters

  • userRegex A JS regex string which should match against MXIDs. E.g. @foobar_.*:matrix.org

Response Body

{
  "users": {
    "@Half-Shot:half-shot.uk": [
      {
        "channels": [
          "#matrix"
        ],
        "dead": false,
        "server": "chat.freenode.net",
        "nick": "Half-Shot"
      }
    ]
  }
}

POST /killUser

This will kill a connection to IRC for a given user on all networks they are connected to.

Request Body

{
  "user_id": "@foo:bar",
  "reason": "Trust nobody"
}

Response Body

If a disconnection was successful, the bridge will emit "null". Otherwise it may emit an error message in plaintext.

Clone this wiki locally