Audit Logs

This document uses the REST API. For more details, see the Authentication for API page.

Search audit logs for an Organization. "api.access" events are omitted from results unless explicitly requested using the events parameter. Supported event types:

  • api.access
  • org.app_bot.create
  • org.app.create
  • org.app.delete
  • org.app.edit
  • org.cloud_config.settings.edit
  • org.collection.create
  • org.collection.delete
  • org.collection.edit
  • org.create
  • org.delete
  • org.edit
  • org.ignore_policy.edit
  • org.integration.create
  • org.integration.delete
  • org.integration.edit
  • org.integration.settings.edit
  • org.language_settings.edit
  • org.notification_settings.edit
  • org.org_source.create
  • org.org_source.delete
  • org.org_source.edit
  • org.policy.edit
  • org.project_filter.create
  • org.project_filter.delete
  • org.project.add
  • org.project.attributes.edit
  • org.project.delete
  • org.project.edit
  • org.project.fix_pr.auto_open
  • org.project.fix_pr.manual_open
  • org.project.ignore.create
  • org.project.ignore.delete
  • org.project.ignore.edit
  • org.project.monitor
  • org.project.pr_check.edit
  • org.project.remove
  • org.project.settings.delete
  • org.project.settings.edit
  • org.project.stop_monitor
  • org.project.tag.add
  • org.project.tag.remove
  • org.project.test
  • org.request_access_settings.edit
  • org.sast_settings.edit
  • org.service_account.create
  • org.service_account.delete
  • org.service_account.edit
  • org.settings.feature_flag.edit
  • org.target.create
  • org.target.delete
  • org.user.add
  • org.user.invite
  • org.user.invite.accept
  • org.user.invite.revoke
  • org.user.invite_link.accept
  • org.user.invite_link.create
  • org.user.invite_link.revoke
  • org.user.leave
  • org.user.provision.accept
  • org.user.provision.create
  • org.user.provision.delete
  • org.user.remove
  • org.user.role.create
  • org.user.role.delete
  • org.user.role.details.edit
  • org.user.role.edit
  • org.user.role.permissions.edit
  • org.webhook.add
  • org.webhook.delete
  • user.org.notification_settings.edit
GEThttps://api.snyk.io/rest/orgs/{org_id}/audit_logs/search
Path parameters
org_id*string (uuid)

The ID of the organization.

Example: "0d3728ec-eebf-484d-9907-ba238019f10b"
Query parameters
Response

Organization Audit Logs.

Headers
Body
data*AuditLogSearch (object)
jsonapi*JsonApi (object)
linksLinks (object)
Request
const response = await fetch('https://api.snyk.io/rest/orgs/{org_id}/audit_logs/search', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "data": {
    "items": [
      {
        "created": "2021-07-01T00:00:00Z",
        "event": "org.create",
        "group_id": "0d3728ec-eebf-484d-9907-ba238019f10b",
        "org_id": "0d3728ec-eebf-484d-9907-ba238019f10b",
        "project_id": "0d3728ec-eebf-484d-9907-ba238019f10b"
      }
    ],
    "type": "text"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource",
    "last": "https://example.com/api/resource",
    "next": "https://example.com/api/resource",
    "prev": "https://example.com/api/resource",
    "related": "https://example.com/api/resource",
    "self": "https://example.com/api/resource"
  }
}

Search audit logs for a Group. "api.access" events are omitted from results unless explicitly requested using the events parameter. Some Organization level events are supported as well as the following Group level events:

  • api.access
  • group.cloud_config.settings.edit
  • group.create
  • group.delete
  • group.edit
  • group.notification_settings.edit
  • group.org.add
  • group.org.remove
  • group.policy.create
  • group.policy.delete
  • group.policy.edit
  • group.request_access_settings.edit
  • group.role.create
  • group.role.delete
  • group.role.edit
  • group.service_account.create
  • group.service_account.delete
  • group.service_account.edit
  • group.settings.edit
  • group.settings.feature_flag.edit
  • group.sso.add
  • group.sso.auth0_connection.create
  • group.sso.auth0_connection.edit
  • group.sso.create
  • group.sso.delete
  • group.sso.edit
  • group.sso.membership.sync
  • group.sso.remove
  • group.tag.create
  • group.tag.delete
  • group.user.add
  • group.user.remove
  • group.user.role.edit
GEThttps://api.snyk.io/rest/groups/{group_id}/audit_logs/search
Path parameters
group_id*string (uuid)

The ID of the Group.

Example: "0d3728ec-eebf-484d-9907-ba238019f10b"
Query parameters
Response

Group Audit Logs.

Headers
Body
data*AuditLogSearch (object)
jsonapi*JsonApi (object)
linksLinks (object)
Request
const response = await fetch('https://api.snyk.io/rest/groups/{group_id}/audit_logs/search', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "data": {
    "items": [
      {
        "created": "2021-07-01T00:00:00Z",
        "event": "org.create",
        "group_id": "0d3728ec-eebf-484d-9907-ba238019f10b",
        "org_id": "0d3728ec-eebf-484d-9907-ba238019f10b",
        "project_id": "0d3728ec-eebf-484d-9907-ba238019f10b"
      }
    ],
    "type": "text"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource",
    "last": "https://example.com/api/resource",
    "next": "https://example.com/api/resource",
    "prev": "https://example.com/api/resource",
    "related": "https://example.com/api/resource",
    "self": "https://example.com/api/resource"
  }
}

Last updated

More information

Snyk privacy policy

© 2024 Snyk Limited | All product and company names and logos are trademarks of their respective owners.