The osu! Mappool Compliance API (omc-api) serves as a source of truth for the OMCC and Tournament Committee website's mappool compliance features. For now, this API is restricted to these tools only. Requests will not be authorized unless the correct value is passed to the X-Api-Key header. This secret is stored under the API_KEY_SECRET environment variable.
The tool relies on hardcoded and file-based rules to function. Rules are checked in order of priority, so if the condition is met, the flow stops immediately. This means that a ranked beatmap with a DMCA flag will always be disallowed. At a high level, the rules are (in order):
- All beatmapsets which are not downloadable or have a content notice (typically a DMCA notice) are flagged as disallowed due to DMCA.
- Beatmapsets which match with an override are handled.
- All beatmapsets with a positive
track_idvalue are flagged as allowed due to being licensed under the Featured Artist program. - All ranked/approved/loved beatmapsets are allowed.
- The beatmapset's tags are checked against the banned sources list.
- The beatmapset's content is checked against a list of tracks which are prohibited by the rightsholder. Matching prior to parentheses is also checked in case the uploader does not use the exact title (i.e. uploaded under
Flying Castleinstead of the trackedFlying Castle (Extended Mix)track). - The beatmapset's content is checked against the list of artists who have restricted use of their content.
Root URL: https://api.omc.stagec.xyz
/validate
The /validate endpoint accepts an array of osu! beatmap IDs as input and returns an object as follows, where failures is a list of osu! beatmap IDs that failed processing (likely due to deletion):
{
"results": ValidationResult[],
"failures": number[]
}ValidationResult: Information about the beatmapset which was processed, including all osu! beatmap IDs from the POST body which belong to the set.
Copy the .env.example file and replace the OSU_CLIENT_ID and OSU_CLIENT_SECRET values with your osu! api v2 client. You can create a client under your osu! account's settings page.
Install bun.
bun install- Installs packagesbun run start- Runs the server (listens onlocalhost:8080)bun run test- Starts tests usingvitest
Structured JSON logs are emitted at DEBUG, INFO, WARN, and ERROR levels. Configure the minimum level with the LOG_LEVEL environment variable in your .env file (defaults to DEBUG).