Skip to main content

GET v1/Datasets/:Id

GET
https://api.subworkflow.ai/v1/datasets/:id

Fet a dataset record by id

Summary

Call this endpoint to get a dataset record by id.

Parameters

nametypelocationrequireddescription
expiresInSecondsnumberqueryoptionalSets the expiry duration for dataset asset share links in seconds. eg. 60 is a duration of 1 minute. Default duration is 10 minutes.

Response

{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"total": { "type": "number" },
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"type":{
"type": "string",
"enum": ["doc", "audio", "video", "image"]
},
"fileName": {
"type": "string"
},
"fileExt": {
"type": "string"
},
"fileSize": {
"type": "number",
},
"itemCount": {
"type": "number"
},
"mimeType":{
"type": "string"
},
"createdAt": {
"type": "number"
},
"updatedAt": {
"type": "number",
"nullable": true
},
"expiresAt": {
"type": "number",
"nullable": true
},
"share": {
"type": "object",
"propeties": {
"url": { "type": "string" },
"token": { "type": "string" },
"expiresAt": { "type": "number", "nullable": true }
}
}
}
}
}
}

Example

curl https://api.subworkfow.ai/v1/datasets/ds_ar7e4PtGX7fGGnSt
--header 'x-api-key: <YOUR-API-KEY>'
{
"success": true,
"total": 1,
"data": {
"id": "ds_ar7e4PtGX7fGGnSt",
"workspaceId": "wks_Gg9Bzi7sx8fbCfWI",
"type": "doc",
"fileName": "my_document",
"fileExt": "pdf",
"fileSize": 777678,
"itemCount": 44,
"mimeType": "application/pdf",
"createdAt": 1761933149632,
"updatedAt": 1761933149632,
"expiresAt": 1762019549632,
"share": {
"url": "https://api.subworkflow.ai/v1/share/dsx_iCAA1uoowAFi9rcu?token=OFWb98",
"token": "OFWb98",
"expiresAt": 1762009529330
}
}
}