MIME Types API

System and custom MIME type management with lookup, import/export, and overlap detection.

All endpoints are prefixed with /api/mimetypes. Auth required (GET), Admin (POST/PUT/DELETE).


Endpoints

MethodPathAuthDescription
GET/mimetypes/systemYesSystem MIME types (2,148+)
GET/mimetypesYesUser-defined types
GET/mimetypes/:idYesGet single type
POST/mimetypesAdminCreate type
PUT/mimetypes/:idAdminUpdate type
DELETE/mimetypes/:idAdminDelete type
GET/mimetypes/lookup/:extYesLook up extension
POST/mimetypes/bulk/deleteAdminBulk delete
GET/mimetypes/exportYesExport all types
POST/mimetypes/importAdminImport types
POST/mimetypes/overlapYesCheck extension overlaps

Request/Response

GET /mimetypes/system

{
  "categories": { "application": 845, "text": 234, "image": 567, ... },
  "breakdown": { ".html": "text/html", ".css": "text/css", ... },
  "total": 2148,
  "colors": { "application": "#ef4444", "text": "#3b82f6", ... }
}

POST /mimetypes

{
  "extension": ".myapp",
  "mimeType": "application/x-myapp",
  "description": "My Custom Application"
}

Part of NexusPanel API Reference

← Back to Documentation