Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding SnykTargetCleaner script and README #53

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

akanchhaS
Copy link

Adding the script to bulk delete target that have no projects associated with them

@akanchhaS akanchhaS requested a review from a team as a code owner August 9, 2024 17:16
Returns:
list: A list of all target data dictionaries.
"""
url = f'https://api.snyk.io/rest/orgs/{org_id}/targets?version={API_VERSION}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the goal is to remove empty targets, don't you need to pass exclude_empty=false as a request param? This API requests omits empty targets by default

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing that! I have made the edit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants