Using SPARQUE With Postman
This section provides step-by-step instructions on how to work with SPARQUE in Postman using the SPARQUE Postman collection. To begin, you can fork or copy the collection to your Postman workspace by clicking the button below:
Changing Variables
To modify variables in the collection, follow these steps:
- Click on the collection.
- Go to the tab Variables.
- Modify the variables as required, for example:
- workspace
- clientid
- clientsecret
If you are a SPARQUE Desk admin user, you can get clientId and clientSecret in SPARQUE Desk under “team-member”.
Send Request to SPARQUE Within Postman
To send a request to SPARQUE within Postman, follow these instructions:
- Open the collection in Postman.
- Click on the three dots next to the collection name.
- Select Add Request from the menu.
- Provide the request path and click Send.
Ensure that the request's Auth Type is set to Inherit from parent and verify that all variables are up to date.
Understanding the Workflow
The collection includes a pre-request script for token management. This script checks if a token is stored and whether it has expired. If the token is expired, the script automatically sends a request to SPARQUE to obtain a new token, which is then used in subsequent requests.