Get Small File

Request

GET /api/get_small_file

Description

Through the file id, download the file in the small file manager.

Path parameters

None

Query parameters

  • token

    The token of the cluster. It can be viewed in the file doris-meta/image/VERSION.

  • file_id

    The file id displayed in the file manager. The file id can be viewed with the SHOW FILE command.

Request body

None

Response

  1. < HTTP/1.1 200
  2. < Vary: Origin
  3. < Vary: Access-Control-Request-Method
  4. < Vary: Access-Control-Request-Headers
  5. < Content-Disposition: attachment;fileName=ca.pem
  6. < Content-Type: application/json;charset=UTF-8
  7. < Transfer-Encoding: chunked
  8. ... File Content ...

If there is an error, it returns:

  1. {
  2. "msg": "File not found or is not content",
  3. "code": 1,
  4. "data": null,
  5. "count": 0
  6. }

Examples

  1. Download the file with the specified id

    1. GET /api/get_small_file?token=98e8c0a6-3a41-48b8-a72b-0432e42a7fe5&file_id=11002
    2. Response:
    3. < HTTP/1.1 200
    4. < Vary: Origin
    5. < Vary: Access-Control-Request-Method
    6. < Vary: Access-Control-Request-Headers
    7. < Content-Disposition: attachment;fileName=ca.pem
    8. < Content-Type: application/json;charset=UTF-8
    9. < Transfer-Encoding: chunked
    10. ... File Content ...