To upload a file.

Request

{
	"name": "config"
}


POST /api/upload HTTP/1.1
    Content-Type: multipart/form-data; boundary=----BoundaryIdentificatorkTrZ
    Content-Length: 205
    Cookie: session=f3a78dd4e51e7
    ------BoundaryIdentificatorkTrZu0gW
    Content-Disposition: form-data; name="json"

    {"name":"firmware"}
    ------BoundaryIdentificatorkTrZu0gW
    Content-Disposition: form-data; name="file" filename="fw.bin"
    Content-Type: application/octet-stream

    (… binary file data …)
    ------BoundaryIdentificatorkTrZ--

Response

{
      "$schema": "http://json-schema.org/draft-07/schema#",
      "title": "upload - response",
      "type": "object",
      "properties": {
        "status": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z_][a-z0-9_]*$"
          }
        }
      },
      "additionalProperties": false
}

Meaning of json items:

{
      "status": {
        "cfg_update ": "busy"
      }
}