Docs : SDK : deleteItem
deleteItem lets you delete an item from a user's database. This API will return a promise that gets resolved once the item has been durably deleted from the database.
userbase.deleteItem({
databaseName: 'example-database-name',
itemId: '0001'
}).then(() => {
// item deleted
}).catch((e) => console.error(e))
Parameters
-
databaseName [string | Len: 1-100] - The database name to use.
-
itemId [string | Len: 1-100] - The unique identifier of the item to delete.
Advanced Parameters
-
shareToken [string | optional] - The token used to access a shared database.
-
databaseId [string | optional] - The database's unique identifier.
Errors
- ParamsMustBeObject
- DatabaseNotOpen
- DatabaseNameMissing
- DatabaseNameMustBeString
- DatabaseNameCannotBeBlank
- DatabaseNameTooLong
- DatabaseNameRestricted
- DatabaseIdMustBeString
- DatabaseIdCannotBeBlank
- DatabaseIdInvalidLength
- DatabaseIdNotAllowed
- DatabaseIsReadOnly
- ItemIdMissing
- ItemIdMustBeString
- ItemIdCannotBeBlank
- ItemIdTooLong
- ItemDoesNotExist
- ItemUpdateConflict
- UserNotSignedIn
- UserNotFound
- TooManyRequests
- ServiceUnavailable