Links

Scenarios for using Snyk API

The Snyk API scenarios identify procedures you can use to accomplish tasks with Snyk applications using the APIs.
The scenarios are listed on this page under the endpoints they use. They are provided in a repository or on the user docs site (links included).
If you have issues when using these procedures, contact your Technical Success Manager or Solutions Engineer, or submit a ticket to Snyk support.

API v1 Groups

Retrieve a project snapshot for every project in a given group

Scenario: Retrieve-project-snapshots (complete procedure)
Endpoints used: API v1 List all organizations in a group
API v1 (Reporting API) Get list of latest issues

More uses of API v1 Groups

SEE also:

API v1 Import projects

Identify and import new repositories only

Scenario: Identify-and-import-new-repos (complete procedure)
Endpoints used: REST API Get targets by org ID (use latest version)
API v1 Import targets

More uses of API v1 Import projects

SEE also: API v1 Projects: Import fresh Container images

API v1 Integrations

Rotate or change your broker token for any reason

Scenario: Broker-token-rotation (complete procedure)
Endpoints used: API v1 List all the organizations a user belongs to (group admin only)
API v1 Update existing integration (to enable broker)

For a specific event or time, disable all interactions (pull requests, tests) from Snyk to the code base (source control management repository)

Scenario: disable-all-interaction-from-snyk (complete procedure)
Endpoints used alternative 1: Get integrations from different organizations and then update the settings for each integration API v1 (Integrations) List
API v1 (Integration settings) Update
Endpoints used alternative 2: Webhooks approach: remove the Snyk webhook by getting the Webhook Id and using it to delete the webhook API v1 List webhooks

More uses of API v1 integrations

API v1 Issues (Reporting API)

Find all projects affected by a vulnerability

Scenario: find-all-projects-affected-by-a-vuln.md (complete procedure)
Endpoints used:API v1 Issues (Reporting API) Get list of issues
API v1 Issues (Reporting API) List all organizations in a group
API v1 Projects List all projects

Bulk ignore issues

Scenario: bulk-ignore-issues (complete procedure)
Endpoints used: REST API beta Get projects by org ID
API v1 Get list of latest issues (To get all issues but Code)
REST experimental Get a summary of issues within an org (To get all Code issues)

REST API Issues (experimental)

SEE: API v1 Issues: Bulk ignore issues

More uses of API v1 Issues (Reporting API)

API v1 Organizations

Create multiple new organizations that all have the same settings in a given group

Scenario: create-multiple-orgs-and-copy-settings (complete procedure)
Endpoints used: API v1 Create a new organization

Assign all users in a given list to all the organizations a company has (all organization in a group)

Scenario: assign-users-to-all-orgs (complete procedure)
Endpoints used: API v1 List all members in a group
API v1 Invite users

Add users to organizations at scale ahead of the first login

Endpoint used: API v1 Provision a user to the organization

More uses of API v1 Organizations

SEE also: API v1 Integrations: Rotate or change your broker token for any reason

API v1 Projects

List all issues including Snyk Code issues in all the projects in an organization

Scenario: list-all-issues-for-a-snyk-org (complete procedure)
Endpoints used: API v1 Projects List all projects
API v1 Projects List all aggregated issues (no Code)
REST (experimental) Get a Snyk Code issue by its ID
API v1 Projects (Ignored issues) Retrieve ignore (scroll down)

Tag all projects in Snyk

Scenario: Tag projects in Snyk (complete procedure)
Endpoints used: API v1 List all projects

Import fresh Container images

Scenario: import-new-container-images (complete procedure)
Endpoints used: API v1 List all projects
API v1 Import targets

Detect and import new projects in a repository into a target

Scenario: detect-and-import-new-projects (complete procedure)
Endpoints used: API v1 List all projects
API v1 Import targets

More uses of API v1 Projects

SEE also: API v1 Import projects: Identify and import new repositories only
API v1 Issues (Reporting API): Find all projects affected by a vulnerability
API v1 Issues (Reporting API): Bulk ignore issues

REST API Targets (Beta)

Detect new projects (files) in repositories and import them into a target in Snyk on a regular basis

Scenario: Identify-and-import-new-repos (complete procedure)
Endpoint used: REST API Get targets by org ID
API v1 Import targets

API v1 Users and Roles

API v1 Webhooks

© 2022 Snyk Limited