Download a Single Attached File in a BP

GET ws/rest/service/v1/bp/record/download/file/{file_id}

where file_id is the file that you want to download.

Purpose

This REST service enables the external application to download a specific attachment in a specific BP record, using the file id, in a:

  • Project/shell, based on the project/shell number.
  • Company, if the project/shell number is not available or has not been provided.

If there is a revision performed on any attached files, the list API returns the latest revised file details.

If any of the attached files are revised (at the record level, or at the line item level), the API list will contain all those revised files.

Note:

  • Reference files are not downloaded, only the base file is downloaded when using this REST API.
  • By design, there are no web services available for the Request for Bid (RFB) business process.

Request Parameters

All parameters should be URL encoded.

Path Parameter

file_id: Specify the file id.

Response Format

An octet-stream of the file along with a JSON object is returned in the following format.

{

"data": [],

"message": [],

"status": <REST status code value>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

If the file id is valid, the file content will come as a zip file, as a part of the response. To get the file, you must save the response.

Note:

The output is in octet-stream format, which only has arbitrary binary data.