Download a file related to the flex document.
URL
(GET) /api/apps/wbflex/documents/{id}/files/file?name={name}&locale={locale}
PARAMETERS
URL parameters are:
id | Specify either a document ID (such as 1000) or a job ID (such as c300). | Mandatory, string |
name | The name of the related file. With sub-folders use the backslash: "myfolder\myfile.docx" | Mandatory, string |
locale | Optional. Uses source locale by default. Permits to fetch attached files in a specific language. | Optional, string |
RESULTS
The method returns the file.
...
- The Content-Type (such as "text/xml")
- The Content-Disposition set to "attachment" and including the file name
EXAMPLES
Fetch the attached file with name "deliverable.indd":
Code Block |
---|
(GET) /api/apps/wbflex/documents/{id}/files/file?name=deliverable.indd |
If the file exist, the HTTP response is the file stream.
If the file does not exist, you get a 400 status code and this JSON result:
Code Block |
---|
{ "error": { "operation": null, "date": "2019-06-21T07:04:51.9080984Z", "title": "Invalid parameter 'name': File name is not valid.", "details": null, "errorurl": null, "messages": [] } } |