Skip to main content

instanceEvents

Subscribe to events for a specific instance via WebSocket.

Receives events when the instance's configuration changes, a deployment is created, an incoming connection is added or removed, or a cloud metric alarm on the instance is registered, updated, deleted, or changes firing state. Requires project:view on the instance's project.

If you cannot view the instance's project, for example after it moves or you lose access, events arrive as null.

graphql
subscription {
instanceEvents(organizationId: "my-org", instanceId: "my-database") {
... on Event { action timestamp }
... on InstanceEvent {
instance { id name status }
}
... on ConnectionEvent {
connection { id fromField toField }
}
... on AlarmEvent {
alarm { id displayName currentState { status message } }
}
}
}
graphql
instanceEvents(
organizationId: ID!
instanceId: ID!
): InstanceEventsPayload

Arguments​

instanceEvents.organizationId ● ID! non-null scalar {#organization-id}​

Your organization's unique identifier.

instanceEvents.instanceId ● ID! non-null scalar {#instance-id}​

The identifier of the instance to subscribe to.

Type​

InstanceEventsPayload union​

Events delivered by the instanceEvents subscription.

Covers the instance itself, incoming connections that terminate on it, alarms attached to it, deployments run against it, and the stash entries of the instance and its deployments.