# Server-sent events stream of org changes, scoped to projects the caller can see; each SSE message data field is one JSON event, resumable via Last-Event-ID Source: https://docs.orchard.hackclub.com/api/operations/events_orgs_get/ `GET /apiv1/events/orgs/{orgId}` Operation ID: `events_orgs_get` Auth: authenticated ## Parameters | Name | In | Required | Description | | --- | --- | --- | --- | | `orgId` | path | Yes | | | `lastEventId` | query | No | Resume after this event id (Redis stream id); the Last-Event-ID header takes precedence | ## Responses ### 200: OK ```json { "anyOf": [ { "additionalProperties": {}, "properties": { "id": { "description": "The changed entity id (deployment, database, job, run, environment, ...); the affected user id for membership.changed", "type": "string" }, "organizationId": { "type": "string" }, "payload": { "anyOf": [ { "additionalProperties": {}, "description": "Payload for jobrun.changed events", "properties": { "currentStepOrder": { "type": [ "integer", "null" ] }, "jobId": { "type": "string" }, "number": { "type": "integer" }, "runId": { "type": "string" }, "status": { "type": "string" } }, "required": [ "jobId", "runId", "number", "status", "currentStepOrder" ], "type": "object" }, { "additionalProperties": {}, "description": "Payload for deployment.metrics events, keyed by pod name", "properties": { "pods": { "additionalProperties": { "additionalProperties": {}, "properties": { "cpuUsage": { "type": "number" }, "memoryUsage": { "type": "number" } }, "required": [ "cpuUsage", "memoryUsage" ], "type": "object" }, "type": "object" }, "totalCpuUsage": { "description": "Total CPU usage across pods, millicores", "type": "number" }, "totalMemoryUsage": { "description": "Total memory usage across pods, bytes", "type": "number" } }, "required": [ "totalCpuUsage", "totalMemoryUsage", "pods" ], "type": "object" }, { "additionalProperties": {}, "description": "Payload for audit.created events; id on the envelope is the audit log row id", "properties": { "action": { "type": "string" }, "actorUserId": { "type": [ "string", "null" ] }, "deploymentId": { "type": [ "string", "null" ] }, "projectId": { "type": [ "string", "null" ] }, "targetId": { "type": [ "string", "null" ] }, "targetLabel": { "type": [ "string", "null" ] }, "targetType": { "type": [ "string", "null" ] } }, "required": [ "action", "deploymentId", "projectId", "targetType", "targetId", "targetLabel", "actorUserId" ], "type": "object" }, { "additionalProperties": {}, "description": "Payload for build.changed events when the write carried a build status; absent for other build writes", "properties": { "buildStatus": { "type": "string" } }, "type": "object" }, {}, { "type": "null" } ], "description": "Event-specific payload: structured for jobrun.changed, deployment.metrics, audit.created and build.changed, informer-derived data for pod.changed and database.changed, absent otherwise" }, "projectId": { "type": "string" }, "ts": { "description": "Emit time, Unix epoch milliseconds", "type": "number" }, "type": { "enum": [ "deployment.changed", "database.changed", "build.changed", "project.changed", "pod.changed", "membership.changed", "deployment.metrics", "job.changed", "jobrun.changed", "environment.changed", "sharedvars.changed", "engine.changed", "audit.created" ], "type": "string" } }, "required": [ "organizationId", "type", "ts" ], "type": "object" }, { "additionalProperties": {}, "description": "Keepalive sent every 25s so proxies do not kill the stream", "properties": { "ts": { "type": "number" }, "type": { "enum": [ "heartbeat" ], "type": "string" } }, "required": [ "type", "ts" ], "type": "object" } ], "description": "The JSON-decoded data field of one SSE message on the org event stream" } ```