snyk-rest-cli
is a community-driven open-source CLI tool that helps you interact with Snyk's REST API, offering additional functionalities beyond the API's built-in capabilities.
This repository is an open-source community project in partnership with Snyk. Contributions and discussions happen openly through issues and pull requests.
- All feedback, issues, and requests should be managed through GitHub Issues.
- Snyk technical support will not handle issues related to this tool and will redirect you here.
- Pull requests are encouraged—the repository author will review submissions.
- For any questions or issues, please contact the repository author.
For more information about Snyk, visit Snyk's official site.
Install the CLI globally using npm:
npm i snyk-rest-cli -g
Verify the installation:
snyk-rest-cli -v
- Retrieve all organizations in a group.
- Retrieve all integrations for all organizations in a group.
- Retrieve issue counts for all organizations in a group.
- Delete empty targets.
All commands require two mandatory flags:
--snyk_token=<SnykToken/ServiceToken>
--api_version=<The requested API version>
Refer to the available commands below and include the necessary flags for execution.
Displays a list of available commands.
Note: The documentation site help is identical to the --help
command.
Displays the CLI version.
Fetch all organizations in the specified group.
Required Flags:
--group_id
: Your group ID.
Fetch all integrations for all organizations in a specified group.
Required Flags:
--group_id
: Your group ID.
Optional Flags:
--source_types
: Check if all organizations in the group have integrated a specific integration (only supports one integration type at a time).
Retrieve issue counts for all organizations in a group, categorized by severity.
Required Flags:
--group_id
: Your group ID.
Retrieve all targets in a group, check if they are empty, and delete them if true.
Required Flags:
--group_id
: Your group ID.
Fetch all organizations in a group, check their Snyk Code settings, and enable/disable as required.
Required Flags:
--group_id
: Your group ID.--sast_enabled
: Enable or disable Snyk Code.
We welcome contributions! If you'd like to submit changes:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request.
For discussions, open an issue in the repository.