Skip to content

POST /sonolus/{type}/{itemName}/submit ​

/sonolus/{type}/{itemName}/community/submit allows Sonolus app to submit actions to item of name {itemName}.

URL Parameters ​

URL ParameterValueDescription
typestringposts, playlists, levels, skins, backgrounds, effects, particles, engines, or replays.
itemNamestringName of item.

Query Parameters ​

Query ParameterValueDescription
localizationstringSee localization.
Configuration OptionsanySee Options Query Parameters.

Request Headers ​

HeaderValueDescription
Sonolus-SessionstringOptional, see Sonolus-Session.

Request Body ​

ts
type ServerSubmitItemActionRequest = {
    values: string
}

values ​

Query parameters of submitted action.

See Options Query Parameters.

Response Code ​

CodeDescription
200 OK
401 UnauthorizedAuthentication required or expired.
404 Not Found

Response Headers ​

HeaderValueDescription
Sonolus-VersionstringOptional, see Sonolus-Version.

Response Body ​

ts
type ServerSubmitItemActionResponse = {
    key: string
    hashes: string[]
    shouldUpdateItem?: boolean
    shouldRemoveItem?: boolean
    shouldNavigateToItem?: string
}

shouldUpdate ​

Whether item details view should update or not.

shouldRemove ​

Whether item details view should be removed or not.

key ​

Server defined upload key.

hashes ​

Hashes of files needed to be uploaded.

Only files specified in request body values can be uploaded.

If not empty, files will be uploaded using POST /sonolus/{type}/{itemName}/upload.

Examples ​

json
{
    "key": "...",
    "hashes": [
        // ...
    ],
    "shouldUpdateItem": true,
    "shouldRemoveItem": true,
    "shouldNavigateToItem": "..."
}