Add web server MIME type handler

This function creates an Apache MIME type handler for a file extension.

Important:

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

SecurityBasicAuth
Request
query Parameters
extension
required
string

The file extension.

Example: extension=.foo
handler
required
string

The Apache MIME handler.

Example: handler=txt-foo
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/add_handler
Request samples
uapi --output=jsonpretty \
  --user=username \
  Mime \
  add_handler \
  extension='.foo' \
  handler='txt-foo'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "add_handler",
  • "module": "Mime",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}