0

API should allow file upload/download

Steve Shipway 2 months ago • updated 2 months ago 1

The API does not appear to allow attached files to be uploaded or downloaded; nor can you access or update custom fields.  This is a big problem when it comes to storing things like Certificate files when you want to have them automatically downloaded and installed by configuration management software.

The GET /read/item or /find/item API calls should return an optional additional field per item, "attachments", with an array of hashes holding file IDs and names (and maybe sizes too).


Then a separate call, GET /read/attachment/<itemid>/<fileid> could return the attached file, with the correct MIME type etc.


For writing attachments, use POST /add/attachment/<item>/<name> and include the MIME type and encoded file as the post body.


For deleting, just GET /delete/attachment/<itemid>/<fileid>