Skip to main content

EventDestination

A place outside Massdriver that receives the organization's audit log events.

The destination gets one delivery for each event of its eventTypes and attributes, and sends the ones its condition passes. A failed send is retried with backoff until it succeeds or the delivery is FAILED. Events go out in any order, and one event can arrive more than once: use the event time when order matters, and the event id to drop duplicates.

type EventDestination {
id: ID!
name: String!
adapter: EventDestinationAdapter!
config: Map!
eventTypes: [String!]!
attributes: Map!
condition: String
status: EventDestinationStatus!
signingSecret: String
failingSince: DateTime
lastDeliveredAt: DateTime
lastError: String
createdAt: DateTime!
updatedAt: DateTime!
deliveries(
filter: EventDeliveriesFilter
sort: EventDeliveriesSort
cursor: Cursor
): EventDeliveriesPage
}

Fields​

EventDestination.id ● ID! non-null scalar {#id}​

Unique identifier of the destination.

EventDestination.name ● String! non-null scalar {#name}​

Name of the destination, unique in the organization.

EventDestination.adapter ● EventDestinationAdapter! non-null enum {#adapter}​

How the destination receives events.

EventDestination.config ● Map! non-null scalar {#config}​

Where and how events are sent, in the shape of the adapter's configSchema. The destination's auth credentials are never returned.

EventDestination.eventTypes ● [String!]! non-null scalar {#event-types}​

The event types the destination receives, or <entity>.* for every event of an entity. An empty list receives every event.

EventDestination.attributes ● Map! non-null scalar {#attributes}​

Attribute values that the event's entity must have had when the event happened, such as {"md-environment": "prod"}. An event must have all of them. An empty map receives events of any attributes.

EventDestination.condition ● String scalar {#condition}​

A jq expression run on each CloudEvent that the eventTypes and attributes select. The event is sent only when it outputs true. null sends every selected event.

EventDestination.status ● EventDestinationStatus! non-null enum {#status}​

Whether the destination receives events.

EventDestination.signingSecret ● String scalar {#signing-secret}​

The secret that signs each request, in Standard Webhooks form (whsec_ followed by base64). Use it to check the webhook-signature header. Treat it as a credential. null for adapters that do not sign.

EventDestination.failingSince ● DateTime scalar {#failing-since}​

When sends to the destination started to fail. null when the last send succeeded.

EventDestination.lastDeliveredAt ● DateTime scalar {#last-delivered-at}​

When the destination last accepted an event (UTC).

EventDestination.lastError ● String scalar {#last-error}​

Why the endpoint did not accept the last send, such as HTTP 503. null when the last send succeeded. Condition errors are on the deliveries, not here.

EventDestination.createdAt ● DateTime! non-null scalar {#created-at}​

When the destination was added (UTC).

EventDestination.updatedAt ● DateTime! non-null scalar {#updated-at}​

When the destination last changed (UTC).

EventDestination.deliveries ● EventDeliveriesPage object {#deliveries}​

One delivery for each event the destination selects: sent, waiting, skipped by the condition, or failed. Delivered and skipped deliveries are kept for the install's retention, 7 days by default, and failed ones for 30 days. Newest first by default.

EventDestination.deliveries.filter ● EventDeliveriesFilter input {#event-destination-deliveries-filter}​

Filter criteria. All filters are combined with AND.

EventDestination.deliveries.sort ● EventDeliveriesSort input {#event-destination-deliveries-sort}​

Sort order. Defaults to createdAt descending.

EventDestination.deliveries.cursor ● Cursor input {#event-destination-deliveries-cursor}​

Pagination cursor from a previous response.

Returned By​

eventDestination query

Member Of​

EventDestinationPayload object ● EventDestinationsPage object