API Documentation

Authentication

Include your secret token in the header of every request.

X-API-Token: your_secret_token_here

POST /api/upload

Upload a new mod, map, or asset. You can attach multiple screenshots.

# Full Example using cURL
curl -X POST http://realm.ku.ni/api/upload \
  -H "X-API-Token: YOUR_TOKEN" \
  -F "file=@/path/to/my_map.zip" \
  -F "game=css" \
  -F "category=map" \
  -F "title=De_Dust2 Winter Edition" \
  -F "description=A snowy version of dust2.\nContains custom textures and sounds." \
  -F "tags=snow, winter, fix" \
  -F "gamemode=de" \
  -F "screenshots=@/path/to/screen1.jpg" \
  -F "screenshots=@/path/to/screen2.png"

Required Fields

  • file: The main file (zip, rar, bsp, mdl...)
  • game: Game slug (e.g., css, hl1, gmod)
  • category: Type (e.g., map, model, skin)
  • title: Name of your content

Optional Fields

  • description: Detailed text
  • tags: Comma separated keywords
  • gamemode: Short prefix (de, ze, zm)
  • screenshots: Image files (multiple allowed)

PUT /api/item/<ID>

Edit details. Warning: Changing 'game' or 'category' will physically move the files on the server storage.

# Example: Rename and Move category
curl -X PUT http://realm.ku.ni/api/item/42 \
  -H "X-API-Token: YOUR_TOKEN" \
  -F "title=New Map Name v2" \
  -F "tags=update, fixed" \
  -F "category=mod" \
  -F "game=css"

DELETE /api/item/<ID>

# Permanently delete item and files
curl -X DELETE http://realm.ku.ni/api/item/42 \
  -H "X-API-Token: YOUR_TOKEN"