Skip to content

GET /sonolus/info ​

/sonolus/info provides information of the server, and is used by Sonolus app to populate server home page.

URL Parameters ​

None.

Query Parameters ​

Query ParameterValueDescription
localizationstringSee localization.
Configuration OptionsanySee Options Query Parameters.

Request Headers ​

HeaderValueDescription
Sonolus-SessionstringOptional, see Sonolus-Session.

Request Body ​

None.

Response Code ​

CodeDescription
200 OK
401 UnauthorizedAuthentication required or expired.

Response Headers ​

HeaderValueDescription
Sonolus-VersionstringOptional, see Sonolus-Version.

Response Body ​

ts
type ServerInfo = {
    title: Text | (string & {})
    description?: Text | (string & {})
    buttons: ServerInfoButton[]
    configuration: ServerConfiguration
    banner?: Srl
}

type ServerInfoButton =
    | ServerInfoAuthenticationButton
    | ServerInfoItemButton
    | ServerInfoConfigurationButton

type ServerInfoAuthenticationButton = {
    type: 'authentication'
}

type ServerInfoItemButton = {
    type:
        | 'room'
        | 'post'
        | 'playlist'
        | 'level'
        | 'replay'
        | 'skin'
        | 'background'
        | 'effect'
        | 'particle'
        | 'engine'
        | 'user'
    title?: Text | (string & {})
    icon?: Icon | (string & {})
    badgeCount?: number
    infoType?: string
    itemName?: string
}

type ServerInfoConfigurationButton = {
    type: 'configuration'
}

ServerInfoItemButton.itemName ​

If present, will navigate to the item directly.

configuration.options ​

Configuration options.

If modified by client, client will attach modified values to every request.

Examples ​

json
{
    "title": "My Server Title",
    "description": "Description of my server.",
    "buttons": [
        // ...
    ],
    "configuration": {
        "options": [
            // ...
        ]
    },
    "banner": {
        // ...
    }
}