All Postman examples provided in these guides are set with the capability to run as a full collection or as individual endpoints. They will not simply run as soon as they are imported into Postman, however, as you will need to add some necessary parameters for authentication such as a valid VNTANA account email / password and Organization and Client / Folder slugs.
To begin, go to the collection view for the Postman collection you wish to run, and set the Global Variable url to the base url of the VNTANA Admin API: https://api-platform.vntana.com. Then, navigate to the Pre-request Script tab of the Collection, shown below, and check what variables need to be set before it can run. Note: these can also be set in the Variables tab if desired, but not all of these need to be used for each collection.
In the above example, four variables are set in the Pre-request Script which are later used by various endpoints to determine what information needs to be stored. The slugs are used to pick the Organization and Client / Folder to use for the collection. Once the globals are set, if you wish to run the collection in its entirety, you will have to ensure the Pre-request Scripts for each endpoint are not commented out and the Header parameters that are needed for the endpoint (i.e. x-auth-token) are deactivated. This will allow each endpoint to set the required data for the next endpoint. If you wish to not use the scripts at all, simply comment out or delete any Pre-request Script you encounter and manually set the values as you need them for each endpoint.
To run any collection as a full collection simply click the three dots by the collection name and select ‘Run collection’.
From here you will need to select which endpoints to run. Only select one of the Login endpoints (depending on your preference) and if you have Organization level access deselect ‘Refresh Token Client’ (for more information on User access levels view this guide).
Then, simply press ‘Run Create Tags’ and check the output. Note: running as a collection will not show the full output of any endpoints, for this you will have to run them individually and check the Response output.
Additionally, for the final endpoint of the Product creation process, in order to stream the file data through Postman you need to ensure you are passing the file as ‘binary’ data in the Body, not as ‘form-data’, and you also may need to permit Postman to upload files that are stored outside the Postman workspace (or just place the files in the Postman workspace). In order to change this setting go to File > Settings and the General Tab, scroll down to ‘Working directory’ and toggle the setting ‘Allow reading files outside working directory’.