Audit of all user-initiated activity within a Snyk org/group

47 views Asked by At

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"
1

There are 1 answers

0
Harsha G V On

Update: First cURL command in my above is working now

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"

Synk support confirmed that

We used to have an incident on our end, in regards to this specific endpoint and now the fix has been deployed. Can you, please, give it another try and let me know if you still see any issues?