List Workspace Files
📄 List Workspace Files
Use this endpoint to get the files inside a workspace by providing a workspace_id. By default, it returns the files at the top level of the workspace. To get the files inside a folder, also provide its ID as folder_id. Files inside subfolders are not included, so use List Workspace Folders to find each folder.
📋 Request Parameters
- workspace_id (string, required): The ID of the workspace, from List Workspaces.
- folder_id (string, optional): The ID of a folder in the workspace, from List Workspace Folders.
- app (string, optional): Transkriptor (default), Eskritor, Speaktor, Recorditor, Amigotor or All.
- limit (integer, optional): Number of files per page, between 1 and 500. Default is 100.
- cursor (string, optional): The
next_cursorvalue from the previous response, to get the next page.
📄 Response
The response contains a files list and a next_cursor. If next_cursor is not null, send it as the cursor parameter to get the next page. When it is null, there are no more files. Use a file's order_id with Get File Details by Order ID or Get Meeting to get more details, such as the recording's video_url.
⚠️ You must be a member or admin of the workspace. Otherwise the endpoint returns 404.
import requests
api_key = 'your_api_key_here' # Replace with your actual API key
# Set up the headers, including the API key
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {api_key}',
'Accept': 'application/json'
}
url = "https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id"
response = requests.get(url, headers=headers)
response_json = response.json()
print(response_json)
const axios = require('axios');
const apiKey = 'your_api_key_here'; // Replace with your actual API key
// Set up the headers, including the API key
const headers = {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`,
'Accept': 'application/json'
};
const url = "https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id";
axios.get(url, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response ? error.response.data : error.message);
});
import okhttp3.*;
import org.json.JSONObject;
public class ListWorkspaceFiles {
private static final String API_KEY = "your_api_key_here"; // Replace with your actual API key
public static void main(String[] args) throws Exception {
OkHttpClient client = new OkHttpClient();
String url = "https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id";
Request request = new Request.Builder()
.url(url)
.addHeader("Authorization", "Bearer " + API_KEY)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
String responseData = response.body().string();
JSONObject json = new JSONObject(responseData);
System.out.println(json.toString(2));
} else {
System.out.println("Request failed: " + response.code());
}
}
}
}
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
public class Program
{
private static readonly string apiKey = "your_api_key_here"; // Replace with your actual API key
public static async Task Main()
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");
var url = "https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id";
var response = await client.GetAsync(url);
if (response.IsSuccessStatusCode)
{
var responseJson = await response.Content.ReadAsStringAsync();
var data = JsonSerializer.Deserialize<JsonDocument>(responseJson);
Console.WriteLine(data.RootElement.ToString());
}
else
{
Console.WriteLine($"Request failed with status: {response.StatusCode}");
}
}
}
package main
import (
"encoding/json"
"fmt"
"net/http"
)
const (
apiKey = "your_api_key_here" // Replace with your actual API key
)
func main() {
url := "https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer "+apiKey)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Request failed:", err)
return
}
defer resp.Body.Close()
if resp.StatusCode == http.StatusOK {
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result)
} else {
fmt.Printf("Request failed with status: %d\n", resp.StatusCode)
}
}
require 'net/http'
require 'json'
require 'uri'
api_key = "your_api_key_here" # Replace with your actual API key
url = URI("https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer #{api_key}"
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
response = http.request(request)
if response.code.to_i == 200
response_json = JSON.parse(response.body)
puts response_json
else
puts "Request failed with status: #{response.code}"
end
<?php
$apiKey = "your_api_key_here"; // Replace with your actual API key
$url = "https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id";
$headers = [
"Authorization: Bearer $apiKey",
"Content-Type: application/json",
"Accept: application/json"
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode == 200) {
$responseJson = json_decode($response, true);
print_r($responseJson);
} else {
echo "Request failed with status: $httpCode\n";
}
?>
import okhttp3.OkHttpClient
import okhttp3.Request
fun main() {
val apiKey = "your_api_key_here" // Replace with your actual API key
val client = OkHttpClient()
val url = "https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id"
val request = Request.Builder()
.url(url)
.addHeader("Authorization", "Bearer $apiKey")
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.build()
client.newCall(request).execute().use { response ->
if (response.isSuccessful) {
println(response.body()?.string())
} else {
println("Request failed with status: ${response.code()}")
}
}
}
import Foundation
let apiKey = "your_api_key_here" // Replace with your actual API key
let url = URL(string: "https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id")!
var request = URLRequest(url: url)
request.addValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("application/json", forHTTPHeaderField: "Accept")
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data, error == nil else {
print("Request failed:", error ?? "Unknown error")
return
}
if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 {
let responseJson = try? JSONSerialization.jsonObject(with: data, options: [])
print(responseJson ?? "Failed to parse response")
} else {
print("Request failed with status:", (response as? HTTPURLResponse)?.statusCode ?? 0)
}
}
task.resume()
import 'dart:convert';
import 'dart:io';
void main() async {
const apiKey = "your_api_key_here"; // Replace with your actual API key
final url = Uri.parse("https://api.tor.app/developer/workspace/list-workspace-files?workspace_id=your_workspace_id&folder_id=your_folder_id");
final request = await HttpClient().getUrl(url)
..headers.set("Authorization", "Bearer $apiKey")
..headers.set("Content-Type", "application/json")
..headers.set("Accept", "application/json");
final response = await request.close();
if (response.statusCode == 200) {
final responseBody = await response.transform(utf8.decoder).join();
final responseJson = jsonDecode(responseBody);
print(responseJson);
} else {
print("Request failed with status: ${response.statusCode}");
}
}
200 OK
{
"files": [
{
"file_id": "#Transkription#01M4TWEDX5KQXSM1XGYJTYFDXX",
"file_name": "Weekly sync with Acme",
"order_id": "1731057205440528558",
"created_at": "1791903611201",
"status": "Completed",
"minutes": 42,
"service": "Standard",
"feature_name": "meeting_recording",
"owner_email": "[email protected]",
"workspace_id": "01K8663F5AQQ1GG1EBDCMRG5SZ",
"folder_id": "01M4TWDS6B40DEWWBT2GSD055Y"
}
],
"next_cursor": "eyJQSyI6IC4uLn0="
}
400 Bad Request
{
"message": "workspace_id is required."
}
404 Workspace Not Found
{
"message": "Workspace not found."
}
404 Folder Not Found
{
"message": "Folder not found in this workspace."
}
500 Internal Server Error
{
"message": "Internal server error"
}
Updated about 10 hours ago
