Lighthouse
Ask or search…
K
🗃

List Files

All uploaded files can be viewed using the given function, the results are paginated with 2000 records in one page.
JS SDK
API
CLI
const getUploads = async() =>{
/*
@param {string} apiKey - Your API key.
@param {number} [pageNo=1] - The page number for pagination, defaults to 1.
*/
const response = await lighthouse.getUploads("YOUR_API_KEY")
console.log(response)
/* Sample response
{
data: {
fileList: [
{
publicKey: '0x4e6d5be93ab7c1f75e30dd5a7f574f42f675eed3',
fileName: 'sample.txt',
mimeType: 'text/plain',
txHash: '',
status: 'queued',
createdAt: 1691087810426,
fileSizeInBytes: '14',
cid: 'QmQK9V46b4vpNUd7pe7EcCqihBEmcSLH4NVNWukLJhGzgN',
id: '1b2623bd-64ca-4434-8619-24c9a1eca840',
lastUpdate: 1691087810426,
encryption: false
}
]
}
}
*/
}
curl -H 'Authorization: Bearer API_KEY' 'https://api.lighthouse.storage/api/user/files_uploaded?pageNo=<pageNo>'
lighthouse-web3 get-uploads