You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/guides/pro/api.mdx
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,11 +31,21 @@ This page lists common Univer Server APIs. The default base URL is `http://local
31
31
type: 'string',
32
32
required: true,
33
33
description: 'Creator id',
34
+
}, {
35
+
name: 'idempotencyKey',
36
+
type: 'string',
37
+
required: false,
38
+
description: 'Introduced since v0.20.0. Optional idempotency key; The total byte size must be ≤ 64.',
39
+
}, {
40
+
name: 'metaData',
41
+
type: 'string',
42
+
required: false,
43
+
description: 'Introduced since v0.20.0. User-defined information, bound to the created unit, will be transparently passed through in subsequent synchronization events and USIP calls. The total byte size must be ≤ 1024.',
description: 'Introduced since v0.20.0. Optional idempotency key; The total byte size must be ≤ 64.',
310
+
}, {
311
+
name: 'metaData',
312
+
type: 'string',
313
+
required: false,
314
+
description: 'Introduced since v0.20.0. User-defined information, bound to the imported unit, will be transparently passed through in subsequent synchronization events and USIP calls. The total byte size must be ≤ 1024.',
295
315
}],
296
316
example: `curl -X POST 'http://localhost:8000/universer-api/exchange/2/import' \\
Copy file name to clipboardExpand all lines: content/guides/pro/usip.mdx
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,6 +149,11 @@ To determine permissions for reading/editing a document.
149
149
type: 'string',
150
150
example: 'acff-adebc125e45b',
151
151
description: 'Document ID',
152
+
}, {
153
+
name: 'metaData',
154
+
type: 'string',
155
+
example: '{"tenantId":"company1"}',
156
+
description: 'metadata associated with the unit. Introduced since v0.20.0',
152
157
}],
153
158
example: 'curl -X GET "http://sample.univer.ai/role?unitID=acff-adebc125e45b&userID=acd5455e44fc5bb55"',
154
159
}}
@@ -194,9 +199,15 @@ Required when selecting users for protected ranges or sheets.
194
199
type: 'array[string]',
195
200
example: '["unit_id1", "unit_id2"]',
196
201
description: 'Document IDs',
202
+
}, {
203
+
name: 'unitsMetaDatas',
204
+
type: 'object',
205
+
example: '{"unit_id1":"metadata of unit_id1","unit_id2":"metadata of unit_id2"}',
206
+
description: 'metadata of each unit in the unitIDs param, introduced since v0.20.0',
197
207
}],
198
208
example: JSON.stringify({
199
-
unitIDs: ['unit_id1', 'unit_id2', 'unit_id3'],
209
+
unitIDs: ['unit_id1', 'unit_id2'],
210
+
unitsMetaDatas: { unit_id1: 'metadata of unit_id1', unit_id2: 'metadata of unit_id2' },
200
211
}, null, 2),
201
212
}}
202
213
response={{
@@ -300,10 +311,16 @@ For your system to display last edit time.
300
311
type: 'int',
301
312
example: '1762591632345',
302
313
description: 'Unix timestamp in milliseconds',
314
+
}, {
315
+
name: 'metaData',
316
+
type: 'string',
317
+
example: '{"tenantId":"company1"}',
318
+
description: 'metadata associated with the unit. Introduced since v0.20.0',
303
319
}],
304
320
example: JSON.stringify({
305
321
unitID: 'unit_id1',
306
322
editTimeUnixMs: 1762591632345,
323
+
metaData: { tenantId: 'company1' },
307
324
}, null, 2),
308
325
}}
309
326
response={{
@@ -360,7 +377,7 @@ If your USIP service is exposed on the public network, to ensure API request sec
360
377
361
378
Univer uses RBAC with fixed roles: `owner`, `editor`, `reader`. You can override minimum role requirements for permission points.
362
379
363
-
Default permission points:
380
+
Default permission points and minimum role requirements are as follows:
364
381
365
382
| Permission | Enum | Description | Minimum Role | Role Enum |
366
383
|:-------|:---------|:-------|:-------|:-------|
@@ -415,7 +432,7 @@ universer:
415
432
416
433
### Object Permission Inheritance
417
434
418
-
By default, document owners do not automatically own all protected ranges/sheets. To enable inheritance:
435
+
By default, the owner of a document does not automatically have owner permissions for all "protected areas / sub-tables" within that document. If you want the document owner to unconditionally have full permissions over all sub-objects within the document, you can enable permission inheritance by configuring the following settings:
0 commit comments