{"openapi":"3.1.0","info":{"title":"RustMapCDN API","version":"1.0.0","description":"Upload Rust custom maps, list them and switch them on or off from your own scripts, bots and panels. Each map gets a permanent link for your server's levelurl. Create a key in the dashboard under API."},"servers":[{"url":"https://rustmapcdn.com/api/v1"}],"externalDocs":{"description":"Guide and examples","url":"https://rustmapcdn.com/docs/api"},"security":[{"apiKey":[]}],"paths":{"/org":{"get":{"summary":"The key's organisation, its limits and what is left today","responses":{"200":{"description":"The organisation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"}}}},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/maps":{"get":{"summary":"List the organisation's maps, newest first","parameters":[{"name":"status","in":"query","required":false,"description":"Comma-separated filter, such as live,off","schema":{"type":"string","example":"live"}}],"responses":{"200":{"description":"The maps","content":{"application/json":{"schema":{"type":"object","properties":{"maps":{"type":"array","items":{"$ref":"#/components/schemas/Map"}}}}}}},"400":{"description":"Unknown status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Upload a map of up to 95 MB in one request","description":"Send the file's bytes as the body. The file must be a real Rust map. Maps over 95 MB use /uploads.","parameters":[{"name":"filename","in":"query","required":true,"description":"The file's name, ending in .map","schema":{"type":"string","example":"procedural_4500.map"}},{"name":"name","in":"query","required":false,"description":"A name for the dashboard. Defaults to the filename.","schema":{"type":"string"}},{"name":"active","in":"query","required":false,"description":"false uploads it switched off, ready for a vote","schema":{"type":"boolean","default":true}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"The new map, with its link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Map"}}}},"400":{"description":"The filename does not end in .map, or the body is empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"411":{"description":"Content-Length is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Over 200 MB, or over 95 MB and needs /uploads.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The file is not a Rust map.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/maps/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The map's ID","schema":{"type":"string"}}],"get":{"summary":"One map","responses":{"200":{"description":"The map","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Map"}}}},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such map in this organisation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Rename a map, or switch it on or off","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"active":{"type":"boolean"}},"example":{"active":true}}}}},"responses":{"200":{"description":"The map, updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Map"}}}},"400":{"description":"Nothing to change, or a value is the wrong type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such map in this organisation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads":{"post":{"summary":"Start uploading a map of up to 200 MB in pieces","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","size"],"properties":{"filename":{"type":"string","example":"procedural_6000.map"},"size":{"type":"integer","description":"The file's size in bytes"},"name":{"type":"string"},"active":{"type":"boolean","default":true}}}}}},"responses":{"201":{"description":"Send the file in pieces of part_size bytes, numbered from 1","content":{"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string"},"part_size":{"type":"integer"},"parts":{"type":"integer"}}}}}},"400":{"description":"A value is missing or the wrong type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Over 200 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads/{id}/parts/{part}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The upload_id","schema":{"type":"string"}},{"name":"part","in":"path","required":true,"description":"The piece's number, from 1, in order","schema":{"type":"integer","minimum":1}}],"put":{"summary":"Send the next piece","description":"Every piece is part_size bytes except the last. Pieces must arrive in order.","requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Received","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"integer"},"size":{"type":"integer"}}}}}},"400":{"description":"The piece is the wrong size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such upload in this organisation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Out of order, or every piece has already arrived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads/{id}/complete":{"parameters":[{"name":"id","in":"path","required":true,"description":"The upload_id","schema":{"type":"string"}}],"post":{"summary":"Join the pieces into one map","responses":{"201":{"description":"The new map, with its link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Map"}}}},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such upload in this organisation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Pieces are missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The file is not a Rust map. Nothing is kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The upload_id","schema":{"type":"string"}}],"delete":{"summary":"Cancel an unfinished upload","responses":{"204":{"description":"Cancelled"},"401":{"description":"The key is missing or does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such upload in this organisation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 120 requests a minute for this key, or over 20 uploads a day for the organisation. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key, rmc_ followed by 32 characters"}},"schemas":{"Map":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":"string","format":"uri","description":"The link for levelurl"},"status":{"type":"string","enum":["live","off","expired"]},"active":{"type":"boolean"},"size":{"type":"integer","description":"Bytes"},"original_filename":{"type":"string"},"world_size":{"type":["integer","null"],"description":"Read from the file; empty for maps uploaded before September 2026"},"format_version":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time","description":"90 days after upload"}}},"Org":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The URL name in every map link"},"display_name":{"type":"string"},"maps":{"type":"object","properties":{"total":{"type":"integer"},"live":{"type":"integer"}}},"limits":{"type":"object","properties":{"upload_bytes":{"type":"integer"},"single_request_bytes":{"type":"integer"},"uploads_per_day":{"type":"integer"},"uploads_left":{"type":"integer","description":"In the last 24 hours"},"requests_per_minute":{"type":"integer"}}},"key":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["maps:read","maps:write"]}}}}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}