excuse me, i have a question, Isn't this interface...
# spicedb
excuse me, i have a question, Isn't this interface (rpcReadRelationships) supposed to return a list? Why only one relationship, moreover , rpc WriteRelationships , How do I batch write? An error will appear:a relationship can only be specified in an update once per overall WriteRelation... (442 bytes)
👋🏻 -
is a gRPC Streaming API, you have to read from the stream to get the results, so you won't get a list - You can write transactionally multiple relationships.
allows you to do that, please have a look at the API specification in https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.PermissionsService.WriteRelationships. That error suggests that, within the same
payload, you've specified the same relationship at least twice
thanks for your answer, but what i called is the http interface (/v1/relationships/read), but the result is a single data, can i get a list?
because it is a streaming API, if invoked via REST, you will receive responses in JSON-L format (https://jsonlines.org/), with each result being its own line
there won't be an overall JSON response, because it is being streamed over time