Changelogs
Changelogs gives you read access to the audit trail of changes made to a CXAS app. Every time an agent, tool, guardrail, or other resource changes, CX Agent Studio records an entry. The Changelogs class lets you pull those entries and inspect what changed, when, and by whom.
This is helpful for compliance reporting, debugging unexpected behavior after a release, or simply understanding the history of an app before running a regression test suite.
Quick Example
from cxas_scrapi import Changelogs
app_name = "projects/my-project/locations/us/apps/my-app-id"
changelogs = Changelogs(app_name=app_name)
# Fetch recent changelog entries
entries = changelogs.list_changelogs()
for entry in entries:
print(entry.create_time, entry.action, entry.resource_display_name)
Reference
Changelogs
Changelogs(app_name, **kwargs)
Bases: Agents
Core Class for managing Changelog Resources.
Initializes the Changelogs client.
Parameters:
| Name | Type | Description | Default |
app_name | str | The full resource name of the parent App (projects/PROJECT_ID/locations/LOCATION/apps/APP_ID). | required |
Source code in src/cxas_scrapi/core/changelogs.py
| def __init__(self, app_name: str, **kwargs):
"""Initializes the Changelogs client.
Args:
app_name: The full resource name of the parent App
(projects/PROJECT_ID/locations/LOCATION/apps/APP_ID).
"""
# We inherit from Agents because it holds the AgentServiceClient
# which contains changelog methods
super().__init__(app_name=app_name, **kwargs)
self.app_name = app_name
self.resource_type = "changelogs"
|
list_changelogs
Lists changelogs within the app.
Source code in src/cxas_scrapi/core/changelogs.py
| def list_changelogs(self) -> List[types.Changelog]:
"""Lists changelogs within the app."""
request = types.ListChangelogsRequest(parent=self.app_name)
response = self.client.list_changelogs(request=request)
return list(response)
|
get_changelog
get_changelog(changelog_id)
Gets a specific changelog.
Source code in src/cxas_scrapi/core/changelogs.py
| def get_changelog(self, changelog_id: str) -> types.Changelog:
"""Gets a specific changelog."""
request = types.GetChangelogRequest(
name=f"{self.app_name}/changelogs/{changelog_id}"
)
return self.client.get_changelog(request=request)
|