Squidex
  • Welcome to Squidex
  • Getting Started
    • Squidex Cloud
    • Installation Instructions
      • Platforms
        • Install on Kubernetes
        • Install on AWS (Deprecated)
        • Install on AWS EC2 using Docker
        • Install on Azure
        • Install on Azure using ARM
        • Install on Google Cloud Platform (GCP)
        • Install on Docker
        • Install on Heroku
        • Install on IIS
        • Install on Render
        • Install on Vultr
      • Configuration
        • Deploying the Image Resizer Service
      • Troubleshooting and Support
        • Diagnose Runtime Issues
        • Restoring Deleted Apps
      • Install Identity (Deprecated)
      • External Identity Providers
        • Azure AD (OAuth) with Squidex
    • Contributing and Developing
      • Building
      • Developing
      • Extensions
        • Custom Rule Action
      • Contributing
      • Architecture
      • Translating
      • Squidex Docs Program
    • Roadmap
    • Quick Start Guides
      • Vue.js Blog with Squidex
      • React.js Blog with Squidex
      • Angular Blog with Squidex
  • Documentation
    • Introduction and Use Case
    • Concepts
      • Apps
      • Teams
      • Schemas
        • Field Rules
      • Content
        • Scheduled Publishing
      • Assets
        • Querying Assets
      • Localization
      • Migrations
      • Roles & Permissions
      • Rules
        • Publish an Event to Azure Queues using Rules
        • Populate Elasticsearch Index
      • Backups
      • Subscriptions
        • App Subscriptions v/s Team Subscriptions
      • Notifications
      • Dashboard
      • Workflows
    • Software Development Kits
      • TypeScript
      • .NET
        • Version v14 (and Earlier)
        • Version v15 (and Later)
      • PHP
      • Java
    • Developer Guides
      • API
        • Authentication
        • Postman
        • Queries
        • Assets
      • Automation Tools (CLI)
      • Scripting
        • Scripting Helper Methods
      • Embed Content
      • Custom Workflows
      • Custom Editors
      • Custom Sidebars
      • Preview Content
      • Rule Formatting
        • Simple
        • Script
        • Liquid
      • Tutorials
        • Building a Blog with Squidex and Next.js
  • Next
    • Squidex 3.0: API Compatibility
Powered by GitBook
On this page
  • What is Postman?
  • Let's Get Started
  • Pre-requisites
  • 1. Generate a Token for the Client
  • 2. Download the OpenAPI Specification
  • 3. Import the OpenAPI into Postman
  • 4. Make a Request using Postman

Was this helpful?

  1. Documentation
  2. Developer Guides
  3. API

Postman

A Short Tutorial On How to Use Squidex with Postman.

PreviousAuthenticationNextQueries

Last updated 2 years ago

Was this helpful?

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.

What is Postman?

Postman is a free collaboration platform for API development and a good way to get started.

Let's Get Started

Pre-requisites

  • Postman

  • 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.

1. Generate a Token for the Client

A client represents an application such as a mobile App or server application.

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.

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).

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:

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:

curl \
-X POST 'https://cloud.squidex.io/identity-server/connect/token/' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&client_id=[APP_NAME]:[CLIENT_ID]&client_secret=[CLIENT_SECRET]&scope=squidex-api'

2. Download the OpenAPI Specification

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 swagger.json.

3. Import the OpenAPI into Postman

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).

Next, select the downloaded file (2) that you have saved before.

Select Postman Collection (3) (this should be selected by default) and click Import (4).

You should be able to see the API now.

4. Make a Request using Postman

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.

The last step is to enter you access token:

  1. Click the Authorization (10) tab.

  2. Ensure Type (11) is OAuth 2.0.

  3. Paste in the Access Token (12).

  4. Send your request with the Send (13) button.

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!

We have implemented the . 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.

Building a Blog with Squidex and Next.js
OpenID client credentials flow
Authentication
Introduction and Use Case
LogoDownload Postman | Get Started for FreePostman
Acquire a token - 1
Acquire a token - 2
Acquire a token - 3
Content API
Download OpenAPI specification
Import OpenAPI file - 1
Import OpenAPI file - 2
Import OpenAPI file - 3
GET request using Postman - 1
GET request using Postman - 2