benchling_sdk.services.v2.beta.v2_beta_audit_service module¶

class V2BetaAuditService¶

Bases: benchling_sdk.services.v2.base_service.BaseService

V2-Beta Audit Service.

Export audit log data for Benchling objects.

https://benchling.com/api/v2-beta/reference#/Audit

get_audit_log(object_id: str, export: benchling_api_client.v2.beta.models.audit_log_export.AuditLogExport) → AsyncTaskLink¶

Export an audit log file for a Benchling object.

This endpoint launches a long-running task and returns the Task ID of the launched task. The task response contains a link to download the exported audit log file from Amazon S3. This endpoint is subject to a rate limit of 500 requests per hour, in conjunction with the global request rate limit. Export throughput will additionally be rate limited around the scale of 70,000 total audit events exported in csv format or 30,000 total audit events exported in pdf format per hour.

Example of submitting an export request and then getting the download URL from the completed task:

task_link = benchling.v2.beta.audit.get_audit_log(object_id, export) task = benchling.tasks.wait_for_task(task_link.task_id) url = task.response[“downloadURL”]

See https://benchling.com/api/v2-beta/reference#/Audit/auditLog