WatchEvents
events.watch(EventWatchParams**kwargs) -> EventWatchResponse
POST/gitpod.v1.EventService/WatchEvents
Streams events for all projects, runners, environments, tasks, and services based on the specified scope.
Use this method to:
- Monitor resource changes in real-time
- Track system events
- Receive notifications
The scope parameter determines which events to watch:
- Organization scope (default): Watch all organization-wide events including projects, runners and environments. Task and service events are not included. Use by setting organization=true or omitting the scope.
- Environment scope: Watch events for a specific environment, including its tasks, task executions, and services. Use by setting environment_id to the UUID of the environment to watch.
Parameters
environment_id: Optional[str]
Environment scope produces events for the environment itself, all tasks, task executions, and services associated with that environment.
WatchEvents
import os
from gitpod import Gitpod
client = Gitpod(
bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted
)
for event in client.events.watch():
print(event)