Skip to main content

Configuring Postman for Sonrai GraphQL API

One-Click Least Privilege. Zero Disruption.



© 2025 Sonrai Security. All rights reserved.

Overview

The Sonrai GraphQL API library allow users to programatically run GraphQL queries for data and mutations to make updates & configuration changes, similar to the GraphQL commands in use by the user interface which can be run in the CPF application using Advanced Search. You can also use external third-party tools to query the Sonrai GraphQL API library, including:

This page describes configuration steps required to use the Sonrai GraphQL API with Postman.


Prerequisites

A successful token creation within the Sornai platform for use with Postman.
  • Retrieve your Sonrai Org Id by clicking the user profile icon on the top right:
Profile details in Sonrai, including Organization Id.

Configuring Postman

  • Click on to create a new GraphQL request:
How to generate a new GraphQL request within Postman.
  • In the “Authorization” tab, choose “Bearer Token” as the authentication type and add your Sonrai API token:
Adding the Sonrai token to the Postman request.
  • Input your Org Id into the URL bar to query:
    • https://<yourOrgID>.sonraisecurity.com/graphql
info

https://<yourOrganization>.sonraisecurity.com/graphql (*if your Org does not display an Org ID)

  • In the “Headers” tab, add a request header for sonraisecurity-com-org=<yourOrgId>
The required request header for retrieving data from the Sonrai GraphQL API.
  • In the “Query” tab, test a simple query to ensure your configuration is successfully established:
A simple query for the count of users within the Organization, from the Sonrai GraphQL API.