📁 Upload Files
List Files
This endpoint allows you to retrieve a list of all files associated with a specific index.
GET
/
v1
/
indexes
/
{id}
/
files
Header
Path
# Example Request
curl --location --request GET 'https://api.getmetal.io/v1/indexes/:id/files' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>'
{
"data": [
{
"id": "<file-id>",
"status": "CREATED",
"createdAt": "2023-08-29T18:00:00.000Z",
"fileName": "example.pdf",
"fileType": "application/pdf",
"url": "<preSignedUrl>"
},
{
"id": "<file-id-2>",
"status": "CREATED",
"createdAt": "2023-08-29T19:00:00.000Z",
"fileName": "example2.csv",
"fileType": "text/csv",
"url": "<preSignedUrl-2>"
},
// ... more files
]
}
Auth Headers
x-metal-api-key
string
requiredAn API key for your organization.
x-metal-client-id
string
requiredA Client ID for your organization.
Params
id
string
requiredIndex ID
# Example Request
curl --location --request GET 'https://api.getmetal.io/v1/indexes/:id/files' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>'
{
"data": [
{
"id": "<file-id>",
"status": "CREATED",
"createdAt": "2023-08-29T18:00:00.000Z",
"fileName": "example.pdf",
"fileType": "application/pdf",
"url": "<preSignedUrl>"
},
{
"id": "<file-id-2>",
"status": "CREATED",
"createdAt": "2023-08-29T19:00:00.000Z",
"fileName": "example2.csv",
"fileType": "text/csv",
"url": "<preSignedUrl-2>"
},
// ... more files
]
}