Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
List collection files with cursor pagination.
Python
import requests url = "https://www.datalab.to/api/v1/collections/{collection_id}/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/collections/{collection_id}/files \ --header 'X-API-Key: <api-key>'
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};fetch('https://www.datalab.to/api/v1/collections/{collection_id}/files', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
package mainimport ( "fmt" "net/http" "io")func main() { url := "https://www.datalab.to/api/v1/collections/{collection_id}/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": [ { "uploaded_file_id": 123, "original_filename": "<string>", "file_size": 123, "content_type": "<string>", "sort_order": 123, "source_type": "upload", "external_key": "<string>", "external_etag": "<string>", "external_last_modified": "2023-11-07T05:31:56Z", "external_deleted_at": "2023-11-07T05:31:56Z", "last_eval_score": 123, "last_score_breakdown": [ 123 ] } ], "total": 123, "limit": 123, "has_more": true, "next_cursor": "<string>" }
{ "detail": [ { "loc": [ "<string>" ], "msg": "<string>", "type": "<string>" } ]}
x >= 1
Successful Response
Show child attributes
Was this page helpful?