Get files for a page

Contents

    List the files (images, attachments) uploaded to a specific page. The list is sorted by date (most recent first).

    Requires the API Token. See Authentication.

    HTTP Request

    GET /api/files/{key}

    Parameters

    Key Type Description
    token (required) string API Token.

    Response

    HTTP Code: 200
    Content-Type: application/json
    Body:
    {
      "status": "0",
      "message": "Files for the page key: my-dog",
      "data": [
        {
          "file": "/var/www/.../photo.jpg",
          "filename": "photo.jpg",
          "mime": "image/jpeg",
          "size": 248512,
          "thumbnail": "/var/www/.../thumbnails/photo.jpg"
        }
      ]
    }

    thumbnail is an empty string when no thumbnail exists for the file.

    Errors

    Code Reason
    400 The page key contains path-traversal characters (.. or null byte).

    CURL command example

    $ curl -X GET "https://www.example.com/api/files/my-dog?token=<api-token>"