Skip to main content
GET
/
api
/
v1
/
files
List Files
import requests

url = "https://www.datalab.to/api/v1/files"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
curl --request GET \
--url https://www.datalab.to/api/v1/files \
--header 'X-API-Key: <api-key>'
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://www.datalab.to/api/v1/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://www.datalab.to/api/v1/files"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "files": [
    {
      "file_id": 123,
      "original_filename": "<string>",
      "content_type": "<string>",
      "file_size": 123,
      "upload_status": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "reference": "<string>"
    }
  ],
  "total": 123,
  "limit": 123,
  "offset": 123
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

X-API-Key
string
header
required

Query Parameters

limit
integer
default:50
offset
integer
default:0

Cookies

wos-session
string
datalab_active_team
string

Response

Successful Response

Response with list of files.

files
FileMetadataResponse · object[]
required

List of uploaded files

total
integer
required

Total number of files

limit
integer
required

Limit per page

offset
integer
required

Current offset