Events

Returns a paginated list of events in the descending order of their occurrence. Optional query parameters may be used for filtering results

get/events

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /events
  • Auth: none declared

Query parameters

source_servicenamestring

Filter events by the originating service

source_hostidstring

Filter events by the originating host ID

event_typestring

Filter events by a prefix match on the event type (e.g. "user.image.")

resource_typestring

Filter events by the type of resource - tag, imageDigest, repository etc

resource_idstring

Filter events by the id of the resource

levelstring

Filter events by the level - INFO or ERROR

sincestring

Return events that occurred after the timestamp

beforestring

Return events that occurred before the timestamp

pageinteger

Pagination controls - return the nth page of results. Defaults to first page if left empty

limitinteger

Number of events in the result set. Defaults to 100 if left empty

Headers

x-anchore-accountstring

An account name to change the resource scope of the request to that account, if permissions allow (admin only)

Response

Paginated list of event records and the next token

next_pageboolean

Boolean flag, True indicates there are more events and False otherwise

item_countinteger

Number of events in this page

pageinteger

Page number of this result set

Example response

{
  "next_page": true,
  "item_count": 0,
  "page": 6,
  "results": [
    {
      "generated_uuid": "generated_uuid",
      "created_at": "2000-01-23T04:56:07.000+00:00",
      "event": {
        "resource": {
          "user_id": "user_id",
          "id": "id",
          "type": "type"
        },
        "level": "level",
        "details": "{}",
        "source": {
          "base_url": "base_url",
          "hostid": "hostid",
          "servicename": "servicename",
          "request_id": "request_id"
        },
        "type": "type",
        "category": "category",
        "message": "message",
        "timestamp": "2000-01-23T04:56:07.000+00:00"
      }
    },
    {
      "generated_uuid": "generated_uuid",
      "created_at": "2000-01-23T04:56:07.000+00:00",
      "event": {
        "resource": {
          "user_id": "user_id",
          "id": "id",
          "type": "type"
        },
        "level": "level",
        "details": "{}",
        "source": {
          "base_url": "base_url",
          "hostid": "hostid",
          "servicename": "servicename",
          "request_id": "request_id"
        },
        "type": "type",
        "category": "category",
        "message": "message",
        "timestamp": "2000-01-23T04:56:07.000+00:00"
      }
    }
  ]
}

Changes

    • breaking

      the // response's property type changed from no type to object for status

    • breaking

      the /// response's property type changed from no type to object for status

    • breaking

      the /// response's property type changed from no type to object for status

    • info

      added the new optional query request parameter event_type

    • info

      added the optional property /// to the response with the status

    • breaking

      the // response's property type changed from object to no type for status

    • breaking

      the /// response's property type changed from object to no type for status

    • breaking

      the /// response's property type changed from object to no type for status

    • warning

      deleted the query request parameter event_type

    • warning

      removed the optional property /// from the response with the status