Roundup Tracker - Issues

Issue 2551068

classification
Title: Provide way to retrieve file/msg data via rest endpoint.
Type: rfe Severity: normal
Components: API Versions:
process
Status: new Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: rouilj, schlatterbeck
Priority: Keywords: rest

Created on 2019-10-28 00:29 by rouilj, last changed 2019-10-28 15:16 by schlatterbeck.

Messages
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
form.

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/vnd.microsoft.icon

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
History
Date User Action Args
2019-10-28 15:16:20schlatterbecksetnosy: + schlatterbeck
2019-10-28 00:29:03rouiljcreate