Skip to content

Audit Logs

get_audit_logs(query=None, sort=None, page=1, page_size=10, limit=None, **kwargs) async

Get a list of audit logs for the projects the user is a member of.

Note

The audit log can be massive, so setting a limit is highly recommended.

Parameters:

Name Type Description Default
query Optional[str]

Query string to query resources.

Supported query patterns are:

* exact match(`"k=v"`)
* fuzzy match(`"k=~v"`)
* range(`"k=[min~max]"`)
* list with union releationship(`"k={v1 v2 v3}"`)
* list with intersection relationship(`"k=(v1 v2 v3)"`).

The value of range and list can be:

* string(enclosed by `"` or `'`)
* integer
* time(in format `"2020-04-09 02:36:00"`)

All of these query patterns should be put in the query string and separated by ",". e.g. "k1=v1,k2=~v2,k3=[min~max]"

None
sort Optional[str]

Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending order and field2 in descending order with "sort=field1,-field2"

None
page int

The page number to fetch resources from.

1
page_size int

The number of resources to fetch per page.

10
limit Optional[int]

The maximum number of audit logs to retrieve.

None

Returns:

Type Description
List[AuditLog]

The list of audit logs.