Skip to content

giosg - HTTP Api - Exports API

Report Exports

A report export has the following attributes:

Attribute Type Editable Description
id UUID read-only An unique ID for the export
starting_at datetime required The start time of the exported time range (inclusive)
ending_at datetime required The end time of the exported time range (exclusive)
room_id UUID required The ID of the room from which the data is exported
type string required Either logs or stats
format string required The format of the file being exported. If type is logs, then the allowed options are csv, xlsx or txt. If type is stats, then the allowed options are csv or xlsx.
is_real_conversation boolean optional Available only if type is logs. If true, then only export real conversations. If false, then only export non-real conversations. If null (the default) then do not filter.
min_message_count integer optional Available only if type is logs. Defines the minimum number of actual messages that the chat should have to be included in the export. If omitted, then defaults to 0.
created_at datetime read-only When the export was started
created_by_user_id UUID read-only ID of the user who started this export
updated_at datetime read-only When the export was last time modified
completed_at datetime read-only When the export completed (either successfully or with an error). It is null if the exporting is still in progress.
expires_at datetime read-only The moment after which the report cannot be downloaded any more. It is null if exporting is still in progress or if it has failed.
is_failed boolean read-only true if the exporting has failed, failed if the export was successful, null if the export is still in progress
url string read-only The full absolute url at which the exported report file can be downloaded. Only available if the export has completed successfully and if the report is not yet expired, otherwise null.

Start exporting a report

You can start a new report export:

POST /api/v5/orgs/<organization_id>/users/<user_id>/reportexports

You need to provide the required attributes as a payload. This returns the created report export resource in incomplete state. You can then later make a request to resolve if the export has finished.

This endpoint returns:

  • 201 if the request was successful
  • 400 if required attributes are missing from the request
  • 400 if the request payload is in wrong format
  • 401 if you are not authenticated
  • 403 if you do not have active subscription
  • 403 if you do not have access to the organization
  • 403 if you do not have settings permission or you do not have access to the user
  • 404 if user was not found

Retrieve a report export

You can check if the report export has completed and where the final report file can be downloaded:

GET /api/v5/orgs/<organization_id>/users/<user_id>/reportexports/<report_id>

This endpoint returns:

  • 200 if the request was successful
  • 401 if you are not authenticated
  • 403 if you do not have active subscription
  • 403 if you do not have access to the organization
  • 403 if you do not have settings permission or you do not have access to the user

List report exports by a user

You can list all report exports created by a user as a paginated collection. The results are sorted by the created_at timestamp in descending order, the newest first.

GET /api/v5/orgs/<organization_id>/users/<user_id>/reportexports

This endpoint returns:

  • 200 if the request was successful
  • 401 if you are not authenticated
  • 403 if you do not have active subscription
  • 403 if you do not have access to the organization
  • 403 if you do not have settings permission or you do not have access to the user
  • 404 if user was not found