Skip to navigation

Export the tenant's usage of credits as a CSV file

Beta

Export the tenant’s usage of Benchling credits as a CSV file. Returns a task; when the task completes, its result contains a presigned download url and an expiration timestamp.

Notes

  • Requires tenant admin permission.
  • The report reflects only AI credits.
  • Returns 400 if fromTimestamp is later than toTimestamp, or if userId does not identify a user in the tenant.
  • If the export cannot retrieve all usage in the requested range, the result has truncated: true, no url, and a message explaining why. Narrow the time range and try again.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

EARLY-ACCESSstringOptional

Set to true to access beta operations via /api/v3.

Request

This endpoint expects an object.
fromTimestampstringRequiredformat: "datetime"
Start of the time range of usage events to export
toTimestampstringRequiredformat: "datetime"
End of the time range of usage events to export.
includeNonCreditProductsbooleanOptional
Whether to include usage that does not draw from the tenant's credit grant. Defaults to true.
userIdstringOptional
Restrict the export to usage by the user with this ID.

Response

Task started
pollingUristringOptionalformat: "uri"
taskIdstringOptional

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error