Exporting a collection and embed external files

We are using Postman to create API definitions for use in an application security testing tool. This tool uses the exported .json file to understand which endpoints to test, and how they are to be tested.

All fine so far. However, some of our APIs expect files to be uploaded to it, and we need to incorporate that into our security testing. In Postman, this means we attach a test data file like shown below.

image

When we export this postman collection, the .json file will refer to the external test data file, with its absolute path. However, our testing tool does not understand external files and the collections fail to validate.

I’m asking here because I’m trying to work around this issue by making Postman export a .json file that contains the form multipart upload data embedded into the .json collection. Is this possible? I assume I can do it the uber-manual way: base64-encoding the file and pasting the result into a raw body and add the correct headers. This, however, will be very tedious and fragile.

Is there a better way to get all the test data embedded into the export?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.