Follow event feeds#

Event feeds list changes to catalog records and published knowledge, oldest first. Poll them to react to new data.

Prerequisites#

Steps#

  1. Read catalog changes after a revision (0 starts at the beginning):

    page = client.events.catalog("preview-imagery", after=0, limit=100)
    for event in page.items:
        print(event.revision, event.record_id)
    position = page.latest
    

    REST: GET /v1/events/catalog/{collection}?after=0&limit=100.

  2. Read knowledge publications for a project:

    page = client.events.gkb("coastal", after=0, limit=100)
    for event in page.items:
        print(event.sequence, event.artifact_id)
    

    REST: GET /v1/events/gkb/{project}?after=0&limit=100. A GKB event names who published it in origin when an agent did.

  3. Continue from the last position you saw. Limits are at most 500 per page.

Result#

Each page returns items, latest and earliest. If the feed no longer keeps events after your position, the server answers HTTP 410 and the client raises EventCursorExpiredError with latest and earliest; resume from latest. See Events API.