Hi
DUMP_FILE_CONTENTS is for downloading a file FROM an external API.
If you want to implement a REST-API you should build an USP that "gives" the file and ends with something like this
putitem/id $webinfo("HTTPRESPONSEHEADERS"), "cache-control", "no-cache"
putitem/id $webinfo("HTTPRESPONSEHEADERS"), "Content-Type", your_media_type
putitem/id $webinfo("HTTPRESPONSEHEADERS"), "Expires", "0"
putitem/id $webinfo("HTTPRESPONSEHEADERS"), "Pragma", "no-cache"
putitem/id $webinfo("HTTPRESPONSEHEADERS"), "Access-Control-Allow-Origin", "*"
$webinfo("output") = the contents of the file you want to give
And, maybe, adding this to set the file name.
putitem/id $webinfo("HTTPRESPONSEHEADERS"), "Content-disposition", "inline; filename=a_file_name"
Hope this helps
---
Luis Vila