Skip to content

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