Learn how to set up the Kandji API in Postman
Configure Kandji API Token
In order to make any API requests, you will need to create an API Key that you will use any time you interact with the API.
- You can visit the Kandji API article for instructions on creating your API Token.
- Store the new API token in a secure location so that you can use it later in these instructions.
It is possible to use other third-party API tools, but we have a Postman Collection available to import all of the current API commands for a quick setup.
If you already have Postman installed on your device, you can skip this step.
- Visit the Postman website so that you can download the Postman API API Platform.
- Copy the Postman.app to your Applications folder.
- Launch the application.
If this is your first time launching Postman, you can either Create a Free account, Sign in, or Skip and avoid signing into the app.
- Check the Postman Preferences to adjust settings such as the Theme.
Import Kandji API Collection into Postman
Follow these steps for an easy method for importing all available Kandji API requests into Postman.
When new Kandji API commands are added, you will need to import the Kandji API again to have these new commands available in the Collection.
- Visit api.kandji.io and click the Run in Postman button at the top right of the page.
- Select Postman for Mac.
- Select to open in Postman.app.
- Select the Workspace to import the Kandji API into and click Import.
Create Environment Variables
Creating environment variables allows you to store variables such as your API token more securely, as well as use the same variables across different Collections in Postman. You can read more about this in Postman's Collections article.
- Click File > New in Postman.
- Select Environment.
- Add the following variables to the Environment and set the type to Secret
- apiToken, deviceID, ade_token_id
- You should define the value for apiToken now, and only define the others now if you have that information available.
- Save changes.
- Select the new Postman Environment following their guide.
Define Kandji API Variables
- In the Collections Panel, click on Kandji API.
- In the middle panel, click on the Variables tab.
- Define the value for the API URL variable.
- You can find your API URL by navigating to Settings > Access > API Token.
Perform API Commands
You should now be ready to perform API commands. For more information about specific API commands, please review our API documentation.