List audit log events Run in API Explorer

GET /v2/auditlogs/{account}

List audit log events for a given namespace.

Path parameters

  • account string Required

    Namespace to query audit logs for.

Query parameters

  • action string

    action name one of ["repo.tag.push", ...]. Optional parameter to filter specific audit log actions.

  • name string

    name. Optional parameter to filter audit log events to a specific name. For repository events, this is the name of the repository. For organization events, this is the name of the organization. For team member events, this is the username of the team member.

  • actor string

    actor name. Optional parameter to filter audit log events to the specific user who triggered the event.

  • from string(date-time)

    Start of the time window you wish to query audit events for.

  • to string(date-time)

    End of the time window you wish to query audit events for.

  • page integer(int32)

    page - specify page number. Page number to get.

    Default value is 1.

  • page_size integer(int32)

    page_size - specify page size. Number of events to return per page.

    Default value is 25.

Responses

  • 200 application/json

    A successful response.

    Hide response attribute Show response attribute object
    • logs array[object]

      List of audit log events.

      Audit log event.

      Hide logs attributes Show logs attributes object
      • account string
      • action string
      • name string
      • actor string
      • data object
        Hide data attribute Show data attribute object
        • * string Additional properties
      • timestamp string(date-time)
      • action_description string
  • 429 application/json
  • 500 application/json
  • default application/json

    An unexpected error response.

    Hide response attributes Show response attributes object
    • code integer(int32)
    • message string
    • details array[object]
      Hide details attributes Show details attributes object
      • type_url string
      • value string(byte)
GET /v2/auditlogs/{account}
curl \
 --request GET 'https://hub.docker.com/v2/auditlogs/{account}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "logs": [
    {
      "data": {
        "tag": "latest",
        "digest": "sha256:c1ae9c435032a276f80220c7d9b40f76266bbe79243d34f9cda30b76fe114dfa"
      },
      "name": "docker/example",
      "actor": "docker",
      "action": "repo.tag.push",
      "account": "docker",
      "timestamp": "2021-02-19T01:34:35Z",
      "action_description": "pushed the tag latest with the digest sha256:c1ae9c435032a to the repository docker/example\n"
    }
  ]
}
Response examples (429)
{
  "error": false,
  "detail": "Rate limit exceeded"
}
Response examples (default)
{
  "code": 42,
  "message": "string",
  "details": [
    {
      "type_url": "string",
      "value": "string"
    }
  ]
}