NebStore SDK object operations

This reference page lists all operations you can do to manage your objects with Nebula.


Upload object

Uploads an object into a bucket in the project that the API key belongs to. Files are uploaded using FormData.

Sample

const fs = require('fs')
const file = fs.createReadStream('object')

const response = await nebStoreuploadObject('bucketName', 'objectKey', file)
console.log(response)
AttributeFormatRequired?Desription
bucketNamestringrequiredThe name of the bucket where you want to upload the object.
objectKeystringrequiredThe object key, or filename of the object in your bucket.
objectstringrequiredThe local path, filename, and file extension of the object you want to upload. For example: D:/data/image.png

Get object

Retrieves details about an object based on the object's name and the bucket it's located in.

Sample

const response = await nebStore.getObject('bucketName', 'objectKey').console.log(response)
AttributeFormatRequired?Desription
bucketNamestringrequiredThe name of the bucket where the object is.
objectKeystringrequiredThe object key, or filename of the object you want details about.

List all objects in bucket

Lists details about all objects within a bucket based on the bucket name. The results can be paginated.

Sample

const params = {
  page: 1,
  limit: 10,
  startDate: new Date('2024-10-01'),
  endDate: new Date('2024-10-10'),
}

const response = await nebStore.listObjects('bucketName', params)
console.log(response)
AttributeFormatRequired?Desription
bucketNamestringrequiredThe name of the bucket where the objects are uploaded.
pagenumberoptionalJump to a specific page of results.
limitnumberoptionalLimit the number of items on a result page.
startDatestringoptionalThe starting date for filtering objects based on the date they were uploaded. This attribute accepts ISO 8601 dates in YYYY-MM-DD format.
endDatestringoptionalThe ending date for filtering objects based on the date they were uploaded. This attribute accepts ISO 8601 dates in YYYY-MM-DD format.

Delete object

Permanently removes an object from a bucket. This action cannot be reverted.

Sample

const response = await nebStore.deleteObject('bucketName', 'objectKey')
console.log(response)
AttributeFormatRequired?Desription
bucketNamestringrequiredThe name of the bucket where the object is.
objectKeystringrequiredThe object key, or filename of the object you want to delete.

Need help?

If you have any technical questions or bump into any problems, get in touch with our Support team! We are here to help, and welcome any feedback you might have about NebStore.