How to use Postman for Snyk REST API
You can use Postman to see the various endpoints in the Snyk REST API to learn how the API works. Follow these steps to set up Postman for use with the Snyk REST API.
Download Postman: https://www.postman.com/downloads/
Go to the Snyk REST API: https://apidocs.snyk.io/?version=2022-06-08%7Ebeta#overview. Be sure to select the drop down list for the latest version.
Click Download OpenAPI Spec.
Save this file locally to your machine.
Open Postman: https://learning.postman.com/docs/getting-started/importing-and-exporting-data/ and follow these steps:
Click on Collection
Click the Import button
Select the OpenAPI spec file you downloaded from the Snyk REST API.
Accept the default and import.
Click on the top level of the Collection you imported and follow these steps:
Under Authorization tab - Type = API Key, Key=
Authorization,
and Value =token {{snyk_token}}
Under the Variable tab, add new variables:
Variable =
snyk_api_version
, Initial Value and Current Value =2022-06-08~beta
- this should be the version for which you downloaded the OpenAPI spec.Variable =
snyk_token
, Initial Value and Current Value = (enter your service account API token)
Now click Find and Replace at the bottom left.
Search for
version=<string>
- it should find all the url with that information.Replace with
version={{snyk_api_version}}
and this should update all your APIs with the right versions
Last updated
Was this helpful?