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: docs/docs/Infrastructure/eVault.md
+73Lines changed: 73 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,79 @@ mutation {
264
264
}
265
265
```
266
266
267
+
#### bulkCreateMetaEnvelopes
268
+
269
+
Create multiple MetaEnvelopes in a single operation. This is optimized for bulk data import and migration scenarios. Returns a structured payload with per-item results and aggregated success/error counts.
270
+
271
+
**Mutation**:
272
+
```graphql
273
+
mutation {
274
+
bulkCreateMetaEnvelopes(
275
+
inputs: [
276
+
{
277
+
id: "custom-id-1" # Optional: preserve specific IDs during migration
278
+
ontology: "550e8400-e29b-41d4-a716-446655440001"
279
+
payload: {
280
+
content: "First item"
281
+
authorId: "..."
282
+
createdAt: "2025-02-04T10:00:00Z"
283
+
}
284
+
acl: ["*"]
285
+
}
286
+
{
287
+
# id omitted: will generate a new ID
288
+
ontology: "550e8400-e29b-41d4-a716-446655440001"
289
+
payload: {
290
+
content: "Second item"
291
+
authorId: "..."
292
+
createdAt: "2025-02-04T10:01:00Z"
293
+
}
294
+
acl: ["platform-a.w3id"]
295
+
}
296
+
]
297
+
skipWebhooks: false # Optional: set to true to skip webhook delivery
298
+
) {
299
+
results {
300
+
id # ID of the created envelope (or attempted ID if failed)
301
+
success # Whether this individual item succeeded
302
+
error # Error message if failed (null if succeeded)
303
+
}
304
+
successCount # Total number of successful creates
305
+
errorCount # Total number of failed creates
306
+
errors { # Global errors (usually empty)
307
+
message
308
+
code
309
+
}
310
+
}
311
+
}
312
+
```
313
+
314
+
**Features**:
315
+
-**Batch Creation**: Create multiple MetaEnvelopes in a single request
316
+
-**ID Preservation**: Optionally specify IDs for created envelopes (useful for migrations)
317
+
-**Partial Success**: Returns individual results for each item, allowing some to succeed and others to fail
-**Data Migration**: Import existing data from another system while preserving IDs
322
+
-**Bulk Import**: Efficiently create many envelopes at once
323
+
-**Initial Setup**: Populate an eVault with default or seed data
324
+
325
+
**Authentication**:
326
+
This mutation requires a valid Bearer token in the `Authorization` header in addition to the `X-ENAME` header:
327
+
328
+
```http
329
+
X-ENAME: @user-a.w3id
330
+
Authorization: Bearer <jwt-token>
331
+
```
332
+
333
+
**Webhook Suppression**:
334
+
The `skipWebhooks` parameter only suppresses webhooks when:
335
+
1. The parameter is set to `true`, AND
336
+
2. The requesting platform is authorized for migrations (e.g., Emover)
337
+
338
+
For regular platform requests, webhooks are always delivered regardless of this parameter.
339
+
267
340
### Legacy API
268
341
269
342
The following queries and mutations are preserved for backward compatibility but are considered legacy. New integrations should use the idiomatic API above.
0 commit comments