Complete API reference for the Kubiya Audit service methods and exceptions
list(category_type=None, category_name=None, resource_type=None, action_type=None, session_id=None, start_time=None, end_time=None, page=1, page_size=50, sort_direction="desc", limit=None) -> List[Dict[str, Any]]
Parameter | Type | Default | Description |
---|---|---|---|
category_type | Optional[str] | None | Filter by category type (e.g., βagentsβ, βworkflowsβ) |
category_name | Optional[str] | None | Filter by category name |
resource_type | Optional[str] | None | Filter by resource type |
action_type | Optional[str] | None | Filter by action type |
session_id | Optional[str] | None | Filter by session ID |
start_time | Optional[str] | None | Start time in RFC3339 format (e.g., β2023-04-01T00:00:00Zβ) |
end_time | Optional[str] | None | End time in RFC3339 format (e.g., β2023-04-02T00:00:00Zβ) |
page | int | 1 | Page number for pagination |
page_size | int | 50 | Number of items per page |
sort_direction | str | "desc" | Sort direction (βascβ or βdescβ) |
limit | Optional[int] | None | Maximum number of items to return |
List[Dict[str, Any]]
: List of audit log entries directlyAuditError
: If the audit query failsstream(category_type=None, category_name=None, resource_type=None, action_type=None, session_id=None, start_time=None, timeout_minutes=None, verbose=True) -> Generator[Dict[str, Any], None, None]
Parameter | Type | Default | Description |
---|---|---|---|
category_type | Optional[str] | None | Filter by category type |
category_name | Optional[str] | None | Filter by category name |
resource_type | Optional[str] | None | Filter by resource type |
action_type | Optional[str] | None | Filter by action type |
session_id | Optional[str] | None | Filter by session ID |
start_time | Optional[str] | None | Start time in RFC3339 format (default: 5 minutes ago) |
timeout_minutes | Optional[int] | None | Auto-stop streaming after specified minutes |
verbose | bool | True | Include verbose logging information |
Generator[Dict[str, Any], None, None]
: Generator yielding individual audit log entriesAuditError
: If the audit stream fails to startdescribe(audit_id: str) -> Union[Dict[str, Any], str]
Parameter | Type | Description |
---|---|---|
audit_id | str | The ID of the audit event to describe |
Union[Dict[str, Any], str]
: Dictionary containing detailed audit event informationAuditError
: If the audit event cannot be retrievedValueError
: If audit_id is not providedsearch(text=None, category_type=None, category_name=None, resource_type=None, action_type=None, session_id=None, status=None, start_time=None, end_time=None, page=1, page_size=50, sort_direction="desc") -> List[Dict[str, Any]]
Parameter | Type | Default | Description |
---|---|---|---|
text | Optional[str] | None | Text to search for in audit logs |
category_type | Optional[str] | None | Filter by category type |
category_name | Optional[str] | None | Filter by category name |
resource_type | Optional[str] | None | Filter by resource type |
action_type | Optional[str] | None | Filter by action type |
session_id | Optional[str] | None | Filter by session ID |
status | Optional[str] | None | Filter by status (βsuccessβ, βfailedβ, or None) |
start_time | Optional[str] | None | Start time in RFC3339 format (default: 24 hours ago) |
end_time | Optional[str] | None | End time in RFC3339 format |
page | int | 1 | Page number for pagination |
page_size | int | 50 | Number of items per page |
sort_direction | str | "desc" | Sort direction (βascβ or βdescβ) |
List[Dict[str, Any]]
: List of matching audit log entriesAuditError
: If the search failsValueError
: If status is not βsuccessβ or βfailedβmessage
(str
): Error message describing what went wrong"agents"
- Agent-related activities"workflows"
- Workflow executions"users"
- User authentication and management"tools"
- Tool invocations"integrations"
- Integration activities"system"
- System-level events"invoke"
- Invoking agents or tools"execute"
- Executing workflows"create"
- Creating resources"update"
- Updating resources"delete"
- Deleting resources"authentication"
- Authentication attempts"authorization"
- Authorization checks"agent"
- Agent resources"workflow"
- Workflow resources"tool"
- Tool resources"user"
- User resources"integration"
- Integration resources"success"
- Successful operations only"failed"
- Failed operations onlyNone
- All operations (default)