Sonolus Wiki

POST /sonolus/{type}/create

/sonolus/{type}/create allows Sonolus app to create an item.

URL Parameters

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

Query Parameters

Query ParameterValueDescription
localizationstringSee localization.
Configuration OptionsanySee Options Query Parameters.

Request Headers

HeaderValueDescription
Sonolus-SessionstringOptional, see Sonolus-Session.

Request Body

type ServerCreateItemRequest = {
    values: string
}

values

Query parameters of create.

See Options Query Parameters.

Response Code

CodeDescription
200 OK
401 UnauthorizedAuthentication required or expired.

Response Headers

HeaderValueDescription
Sonolus-VersionstringOptional, see Sonolus-Version.

Response Body

type ServerCreateItemResponse = {
    key: string
    hashes: string[]
    shouldUpdateInfo?: boolean
    shouldNavigateToItem?: string
}

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}/upload.

Examples

{
    "key": "...",
    "hashes": [
        // ...
    ],
    "shouldUpdateInfo": true,
    "shouldNavigateToItem": "..."
}