Roundup Tracker - Issues

Issue 2551068

Provide way to retrieve file/msg data via rest endpoint.
Type: rfe Severity: normal
Components: API Versions:
Status: new
: : rouilj, schlatterbeck
Priority: : rest

Created on 2019-10-28 00:29 by rouilj, last changed 2023-08-02 21:59 by rouilj.

msg6780 Author: [hidden] (rouilj) Date: 2019-10-28 00:29
From msg6749:
... I wonder if we should provide a
way via the rest interface to download just the content data in raw

I think the right way to do this is to make the request to
demo/data/file/11/content but set the header:

 Accept:  image/

If the content type matches the file type, respond with a binary data
stream with appropriate Content-Type (either the same as the Accept
type or application/octet-stream) and Content-Length. If it doesn't
match we return 406 - not acceptable.

If we do not set an acept header, or set accept to application/json
or application/xml (if enabled) we get back the standard data wrapped
output like (json format):

    "data": {
        "id": "1",
        "type": "file",
        "link": "https://.../demo/rest/data/file/1",
        "attributes": {
            "content": {
                "link": "https://.../demo/file1/"
            "name": "android-chrome-192x192.png",
            "type": "image/png"
        "@etag": "\"94c0e14629da6944d9ab2a83546d0737\""

Details and discussion are on: issue2551067 specifically at msg6749
msg7823 Author: [hidden] (rouilj) Date: 2023-08-02 21:59
Also see issue 2551289 for changes to handling Accept headers that are not
json or xml. This should allow downloading the binary_content in raw format
without encoding.
Date User Action Args
2023-08-02 21:59:48rouiljsetmessages: + msg7823
2019-10-28 15:16:20schlatterbecksetnosy: + schlatterbeck
2019-10-28 00:29:03rouiljcreate