BulkImportRelationships is a faster path to writing a large number of
relationships at once. It is both batched and streaming. For maximum performance, the caller should attempt to write relationships in as close to relationship sort order as possible: (r
POST {{baseUrl}}/v1/experimental/relationships/bulkimport
EXPERIMENTAL https://github.com/authzed/spicedb/issues/1303
Request Body
{"relationships"=>[{"resource"=>{"objectType"=>"<string>", "objectId"=>"<string>"}, "relation"=>"<string>", "subject"=>{"object"=>{"objectType"=>"<string>", "objectId"=>"<string>"}, "optionalRelation"=>"<string>"}, "optionalCaveat"=>{"caveatName"=>"<string>"}}, {"resource"=>{"objectType"=>"<string>", "objectId"=>"<string>"}, "relation"=>"<string>", "subject"=>{"object"=>{"objectType"=>"<string>", "objectId"=>"<string>"}, "optionalRelation"=>"<string>"}, "optionalCaveat"=>{"caveatName"=>"<string>"}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"numLoaded":"\u003cstring\u003e"}