Get file metadata
client.files.retrieve(stringfileID, RequestOptionsoptions?): File { id, content_type, created_at, 3 more }
GET/v1/files/{file_id}
Get metadata for a specific file.
Get file metadata
import DeepTable from '@deeptable/deeptable';
const client = new DeepTable({
apiKey: process.env['DEEPTABLE_API_KEY'], // This is the default and can be omitted
});
const file = await client.files.retrieve('file_01kfxgjd94fn9stqm414vjb0s8');
console.log(file.id);{
"id": "file_01kfxgjd94fn9stqm414vjb0s8",
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"created_at": "2024-01-15T10:30:00Z",
"file_name": "financial_report.xlsx",
"object": "file",
"size": 1048576
}Returns Examples
{
"id": "file_01kfxgjd94fn9stqm414vjb0s8",
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"created_at": "2024-01-15T10:30:00Z",
"file_name": "financial_report.xlsx",
"object": "file",
"size": 1048576
}