Listing files
List all files
GET https://<service_host>/file/v2/orgs/<org_id>/workspaces/<workspace_id>/files?created_at=<created_at>&author=<author_id>&file_name=<file_name>
You can list all files in a workspace using the "list files" endpoint. This endpoint accepts a few filters which can help when searching:
created_at
: an ISO 8601 formatted timestamp in the UTC (Z) timezone. Supports date operators:gt
,gte
,lt
,lte
. Example:created_at=gte:2023-03-10T04:25:03Z
.author_id
: UUID of the user that created the file.file_name
: file path and name.
When listing files, the response will always include the latest version of each file.
import requests
limit = 5000
offset = 0
url = f"https://<service_host>/file/v2/orgs/{org_id}/workspaces/{workspace_id}/files?limit={limit}&offset={offset}"
result = requests.get(url, headers={ "Authorization": "Bearer [yourtokenhere]" }).json()