Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Move off v1 API #37

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/snyk_helpers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from requests import Response
import requests
from requests import Response
from snyk import SnykClient


def _get_snyk_tag_page(snyk_group_id: str, snyk_api_key: str,
page_number: int, page_size: int) -> Response:
snykurl: str = "https://api.snyk.io/api/v1/group/" + snyk_group_id + \
snykurl: str = "https://api.snyk.io/api/group/" + snyk_group_id + \
"/tags?perPage=" + str(page_size) + "&page=" + str(page_number)
headers: dict[str, str] = {
'Authorization': f'token {snyk_api_key}',
Expand Down Expand Up @@ -43,7 +43,7 @@ def _get_snyk_tags(snyk_group_id: str, snyk_api_key: str,

def _delete_tag(tag_dict, group_id, snyk_key):

delete_tag_url = "https://api.snyk.io/api/v1/group/" + group_id + "/tags/delete"
delete_tag_url = "https://api.snyk.io/api/group/" + group_id + "/tags/delete"
json_body = {
"key": tag_dict['key'],
"value": tag_dict['value'],
Expand Down
Loading