Return web server's MIME types

This function lists all of Apache's MIME types.

Note:

This function does not list PHP versions with MIME types when the user or domain enables PHP-FPM. The system displays only custom MIME types.

Important:

When you disable the Web Server role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
type
required
string

The MIME types to list.

  • system — List the Apache system MIME types.
  • user — List the Apache user MIME types.
Enum: "system" "user"
Example: type=user
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Mime/list_mime
Request samples
uapi --output=jsonpretty \
  --user=username \
  Mime \
  list_mime \
  type='user'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "list_mime",
  • "module": "Mime",
  • "result": {
    • "data": [
      • {
        • "extension": ".foo",
        • "origin": "user",
        • "type": "application/foo"
        }
      ],
    • "errors": null,
    • "messages": null,
    • "metadata": {
      • "transformed": 1
      },
    • "status": 1,
    • "warnings": null
    }
}