Postman sample OData queries
Postman is a tool that lets you construct, execute, and test HTTP requests in a quick and easy way. This article, demonstrates how to run OData queries with the Postman app against a real environment. Postman provides a sandbox to play with different sample queries and see the results.
For more information, see OData Getting Started.
: You need to connect to an online Sitefinity CMS instance.
You need to:
- Host your Sitefinity CMS instance on IIS.
For more information, see Run projects on IIS.
- Setup authentication.
For more information, see Request access token.
To run the tutorial, perform the following:
- Install The Postman app or use Postman on the web.
To do this, go to Download Postman.
- Sign in or register in Postman and open it.
- Import the SitefinityODataPostmanCollection.json file.
This file contains all sample queries described in the Headless API documentation.
- In Postman, in the left menu, click Environments » Import.
- Upload the SitefinityODataPostmanEnvironment.json file and import it.
The Postman environment defines multiple variables that you must configure to be able to use the provided samples.
For more information, see the Postman documentation » Using variables.
- Select Sitefinity Web Services environment and edit it.
- Assign you current Sitefinity CMS instance URL to the baseurl variable
- Change the values of username and password, if required.
- In the left, click Collections » Sitefinity Web Services.
- Click the Auth tab and select the type of authentication, corresponding to the authentication protocol of your Sitefinity CMS instance.
- Execute the request.
If the request is successful, the token received will be automatically added to the environment variables
RESULT: You are set up. You can start executing other request and playing with the samples.