collections
Get Collection
Get collection summary and S3 sync status.
GET
/
api
/
v1
/
collections
/
{collection_id}
Get Collection
import requests
url = "https://www.datalab.to/api/v1/collections/{collection_id}"
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} \
--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}', 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/collections/{collection_id}"
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))
}{
"id": 123,
"name": "<string>",
"description": "<string>",
"archived": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"file_count": 0,
"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
]
}
],
"s3_source": {
"id": 123,
"bucket": "<string>",
"prefix": "<string>",
"region": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key_redacted": "<string>",
"sync_status": "<string>",
"last_sync_started_at": "2023-11-07T05:31:56Z",
"last_sync_completed_at": "2023-11-07T05:31:56Z",
"last_sync_file_count": 123,
"last_sync_error": "<string>",
"output_bucket": "<string>",
"output_prefix": "<string>",
"output_region": "<string>",
"output_aws_access_key_id": "<string>",
"output_aws_secret_access_key_redacted": "<string>",
"writeback_status": "<string>",
"last_writeback_run_id": 123,
"last_writeback_started_at": "2023-11-07T05:31:56Z",
"last_writeback_completed_at": "2023-11-07T05:31:56Z",
"last_writeback_file_count": 123,
"last_writeback_total_file_count": 123,
"last_writeback_failed_file_count": 123,
"last_writeback_error": "<string>",
"last_writeback_error_code": "<string>",
"last_writeback_manifest_uri": "<string>"
},
"s3_status": {
"collection_id": 123,
"sync_status": "<string>",
"writeback_status": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Get Collection
import requests
url = "https://www.datalab.to/api/v1/collections/{collection_id}"
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} \
--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}', 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/collections/{collection_id}"
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))
}{
"id": 123,
"name": "<string>",
"description": "<string>",
"archived": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"file_count": 0,
"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
]
}
],
"s3_source": {
"id": 123,
"bucket": "<string>",
"prefix": "<string>",
"region": "<string>",
"aws_access_key_id": "<string>",
"aws_secret_access_key_redacted": "<string>",
"sync_status": "<string>",
"last_sync_started_at": "2023-11-07T05:31:56Z",
"last_sync_completed_at": "2023-11-07T05:31:56Z",
"last_sync_file_count": 123,
"last_sync_error": "<string>",
"output_bucket": "<string>",
"output_prefix": "<string>",
"output_region": "<string>",
"output_aws_access_key_id": "<string>",
"output_aws_secret_access_key_redacted": "<string>",
"writeback_status": "<string>",
"last_writeback_run_id": 123,
"last_writeback_started_at": "2023-11-07T05:31:56Z",
"last_writeback_completed_at": "2023-11-07T05:31:56Z",
"last_writeback_file_count": 123,
"last_writeback_total_file_count": 123,
"last_writeback_failed_file_count": 123,
"last_writeback_error": "<string>",
"last_writeback_error_code": "<string>",
"last_writeback_manifest_uri": "<string>"
},
"s3_status": {
"collection_id": 123,
"sync_status": "<string>",
"writeback_status": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}