Comment on page
A Short Tutorial On How to Use Squidex with Postman.
This documentation is based on the FoodCrunch use case. Please open the link below alongside this page to understand the examples.
This is a short tutorial detailing how to create first requests using Postman.
Postman is a free collaboration platform for API development and a good way to get started.
- A Squidex App
If you do not yet have an App, you can refer to one of the quick start guides to create an App that has a pre-defined schema and sample content.
Alternatively, if you wish to create an app from scratch and learn how to create a schema and add content then the following link is a good place to start.
A client represents an application such as a mobile App or server application.
We have implemented the OpenID client credentials flow. It is a secure and open standard to protect your APIs and to provide authentication for clients (aka applications) and users. It is also used by big brands such as Microsoft, GitHub and Google. You've already used it in the past, when you've logged into applications using third party logins.
By default, a default client is generated for your App. If this is not the case, you are probably running an older version of Squidex. If this is the case, you have to create a new client with a name of your choice.
To acquire a token you should perform the following steps:
Go to the Settings (1) section of your App, select Clients (2) under Security and then click the Connect (3) button.
Acquire a token - 1
Next, we provide explanations on how to connect to your App. For now, we must connect manually with Postman. Click the first option i.e. Connect manually (4).
Acquire a token - 2
In the next step, you see the token that is generated for you and how to use it. Just copy the token by clicking the copy-button (5) as shown in the screenshot below:
Acquire a token - 3
This token is valid for 30 days, but can be renewed as often as you want.
You can also access the token with an HTTP request using the Client ID and Client Secret as below:
-X POST 'https://cloud.squidex.io/identity-server/connect/token/' \
-H 'Content-Type: application/x-www-form-urlencoded' \
Squidex creates an OpenAPI documentation for your App. We are going to download it in order to import it to Postman:
Go to the API (1) section of your App and click the Content API (2) link to open the API docs in a new tab.
The documentation shows all the end points that are available for your content. Download (3) the OpenAPI specification file and save it in your file system to import it with Postman. The file is called
Download OpenAPI specification
Next, you need to import the OpenAPI file to Postman. To do this, launch Postman and click the Import (1) button in your Workspace (or alternatively click File and then Import).
Import OpenAPI file - 1
Next, select the downloaded file (2) that you have saved before.
Import OpenAPI file - 2
Select Postman Collection (3) (this should be selected by default) and click Import (4).
Import OpenAPI file - 3
You should be able to see the API now.
We are now ready to make requests using Postman. To make a request:
- 1.Go to the Collections (5).
- 2.Select the ContentAPI (6) for your App, its called Squidex API in this example
- 3.Select the endpoints for your schema (7). In our example there are two schemas and the magazine schema is selected.
- 4.Next, select the query endpoint (8) to query all content items.
- 5.Uncheck (9) all query parameters.
GET request using Postman - 1
The last step is to enter you access token:
- 1.Click the Authorization (10) tab.
- 2.Ensure Type (11) is
- 3.Paste in the Access Token (12).
- 4.Send your request with the Send (13) button.
GET request using Postman - 2
You should see a response body which is the result of the GET request.
You have just learnt how to retrieve the content items using Postman!