Docs : SDK : updateItem
updateItem lets you modify an existing item in a user's database. This API will return a promise that gets resolved once the item has been durably updated in the database.
userbase.updateItem({ databaseName, item, itemId })
.then(() => {
// item updated
})
.catch((e) => console.error(e))
Parameters
-
databaseName [string | Len: 1-50] - The database name to use.
-
item [object | Max size: 10 KB] - The object to overwrite the existing item with.
-
itemId [string | Len: 1-100] - The unique identifier of the item to replace.
Errors
- ParamsMustBeObject
- DatabaseNotOpen
- DatabaseNameMustBeString
- DatabaseNameCannotBeBlank
- DatabaseNameTooLong
- ItemIdMustBeString
- ItemIdCannotBeBlank
- ItemIdTooLong
- ItemMissing
- ItemTooLarge
- ItemDoesNotExist
- ItemUpdateConflict
- UserNotSignedIn
- UserNotFound
- ServiceUnavailable