Task: Perform audit of all user-initiated activity within a Snyk org/group
Steps that I followed:
I referred this document: https://docs.snyk.io/snyk-admin/manage-users-in-organizations-and-groups/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group and tried below cURL commands but encountered errors like bad API request
, snyk-openapi-004-not-found
, group not found
, An unknown error was encountered while handling your request
with 400|500 errors.
GROUP_ID=xxxxxxxxxx
SNYK_TOKEN=xxxxxxxxxx
curl \
-X 'GET' \
-H "Authorization: Token $SNYK_TOKEN" \
-H "Accept: application/vnd.api+json" \
-H "Content-Type: application/json" \
"https://api.snyk.io/rest/groups/${GROUP_ID}/audit_logs/search?version=2023-05-02%7Ebeta"
curl \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: token $SNYK_TOKEN" \
--data-binary \
"{\"filters\": {}}" \
"https://api.snyk.io/v1/group/${GROUP_ID}/audit"
Update: First cURL command in my above is working now
Synk support confirmed that