-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdocs_sdk_delete-item.html
69 lines (59 loc) · 1.94 KB
/
docs_sdk_delete-item.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!-- Docs - SDK - deleteItem -->
<div class="section">
<h2><a href="/docs/">Docs</a> : <a href="/docs/sdk/">SDK</a> : deleteItem</h2>
<p><span class="font-semibold">deleteItem</span> 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.</p>
<pre>
<code class="language-javascript">
userbase.deleteItem({
databaseName: 'example-database-name',
itemId: '0001'
}).then(() => {
// item deleted
}).catch((e) => console.error(e))
</code>
</pre>
<h3 id="params">Parameters</h3>
<ul>
<li>
<span class="field">databaseName</span> [string | Len: 1-100] - The database name to use.
</li>
<li>
<span class="field">itemId</span> [string | Len: 1-100] - The unique identifier of the item to delete.
</li>
</ul>
<h3 id="advanced-params">Advanced Parameters</h3>
<ul>
<li>
<span class="field">shareToken</span> [string | optional] - The token used to access a shared database.
</li>
<li>
<span class="field">databaseId</span> [string | optional] - The database's unique identifier.
</li>
</ul>
<h3 id="errors">Errors</h3>
<ul>
<li>ParamsMustBeObject</li>
<li>DatabaseNotOpen</li>
<li>DatabaseNameMissing</li>
<li>DatabaseNameMustBeString</li>
<li>DatabaseNameCannotBeBlank</li>
<li>DatabaseNameTooLong</li>
<li>DatabaseNameRestricted</li>
<li>DatabaseIdMustBeString</li>
<li>DatabaseIdCannotBeBlank</li>
<li>DatabaseIdInvalidLength</li>
<li>DatabaseIdNotAllowed</li>
<li>DatabaseIsReadOnly</li>
<li>ItemIdMissing</li>
<li>ItemIdMustBeString</li>
<li>ItemIdCannotBeBlank</li>
<li>ItemIdTooLong</li>
<li>ItemDoesNotExist</li>
<li>ItemUpdateConflict</li>
<li>UserNotSignedIn</li>
<li>UserNotFound</li>
<li>TooManyRequests</li>
<li>ServiceUnavailable</li>
</ul>
</div>
<hr>