import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.files.list({});
console.log(result);
}
run();{
"object": "list",
"data": [
{
"object": "<string>",
"id": "<string>",
"source_type": {},
"upload_status": {},
"url": {},
"created_at": {},
"updated_at": {},
"filename": "<string>",
"content_type": "<string>",
"size": 123,
"provider": "<string>",
"file_url": "<string>"
}
],
"has_more": true,
"url": "<string>"
}Returns a list of files for the current account. Supports filtering by source_type.
import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.files.list({});
console.log(result);
}
run();{
"object": "list",
"data": [
{
"object": "<string>",
"id": "<string>",
"source_type": {},
"upload_status": {},
"url": {},
"created_at": {},
"updated_at": {},
"filename": "<string>",
"content_type": "<string>",
"size": 123,
"provider": "<string>",
"file_url": "<string>"
}
],
"has_more": true,
"url": "<string>"
}API key in the format: Bearer {api_token}
Cursor for pagination — the ID of the last item in the previous page
Items per page
1 <= x <= 100Filter by source type
upload, external Was this page helpful?