List Files
curl --request GET \
--url https://{gatewayBaseURL}/files \
--header 'Authorization: Bearer <token>' \
--header 'x-tfy-provider-name: <x-tfy-provider-name>'import requests
url = "https://{gatewayBaseURL}/files"
headers = {
"x-tfy-provider-name": "<x-tfy-provider-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-tfy-provider-name': '<x-tfy-provider-name>',
Authorization: 'Bearer <token>'
}
};
fetch('https://{gatewayBaseURL}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{gatewayBaseURL}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-tfy-provider-name: <x-tfy-provider-name>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{gatewayBaseURL}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tfy-provider-name", "<x-tfy-provider-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{gatewayBaseURL}/files")
.header("x-tfy-provider-name", "<x-tfy-provider-name>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{gatewayBaseURL}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tfy-provider-name"] = '<x-tfy-provider-name>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "<string>",
"data": [
{
"object": "<string>",
"id": "<string>",
"purpose": "<string>",
"filename": "<string>",
"bytes": 123,
"created_at": 123,
"expires_at": 123,
"status": "<string>",
"status_details": "<string>"
}
],
"has_more": true,
"first_id": "<string>",
"last_id": "<string>"
}Files
List Files
Lists files uploaded for the chosen provider.
GET
/
files
List Files
curl --request GET \
--url https://{gatewayBaseURL}/files \
--header 'Authorization: Bearer <token>' \
--header 'x-tfy-provider-name: <x-tfy-provider-name>'import requests
url = "https://{gatewayBaseURL}/files"
headers = {
"x-tfy-provider-name": "<x-tfy-provider-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-tfy-provider-name': '<x-tfy-provider-name>',
Authorization: 'Bearer <token>'
}
};
fetch('https://{gatewayBaseURL}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{gatewayBaseURL}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-tfy-provider-name: <x-tfy-provider-name>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{gatewayBaseURL}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tfy-provider-name", "<x-tfy-provider-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{gatewayBaseURL}/files")
.header("x-tfy-provider-name", "<x-tfy-provider-name>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{gatewayBaseURL}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tfy-provider-name"] = '<x-tfy-provider-name>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "<string>",
"data": [
{
"object": "<string>",
"id": "<string>",
"purpose": "<string>",
"filename": "<string>",
"bytes": 123,
"created_at": 123,
"expires_at": 123,
"status": "<string>",
"status_details": "<string>"
}
],
"has_more": true,
"first_id": "<string>",
"last_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Name of the provider
Optional metadata for the request
Vertex AI storage bucket name
Vertex AI region (e.g., europe-west4)
Provider-specific model identifier
Response
200 - application/json
All files retrieved successfully
Type of the object, e.g., 'list'.
Array of file objects.
Show child attributes
Show child attributes
Whether there are more files to retrieve.
The ID of the first file in the list.
The ID of the last file in the list.
Was this page helpful?