Hi, question if this is supposed to
# spicedb
j
Hi, question if this is supposed to happen. The route
/v1/relationships/read
returns the header
Content-Type: application/json
when it finds a matching relation. But not if there is no match, then the header doesn't show up. This is this correct?
v
there is no formal API definition because it's all done by a middleware that generates an HTTP API out of the gRPC definition. We used to have a Swagger API definition linked from the docs site but seems to have dissapeared with the new version of the docs site. see https://app.swaggerhub.com/apis-docs/authzed/authzed/1.0
j
Thanks for the clarification. I can understand that gRPC should be first class, and the REST-API is derived from it.
In the same vain, the results of
/v1/relationships/read
returns invalid JSON when there are multiple results in the response (multiple root elements in the response).
Then, following these side effects, I suppose it would be more reasonable to implement the Python gRPC library you're publishing instead of trying to implement the REST-API.
v
It is not malformed, it follows https://jsonlines.org/
it's a spec typically used for streaming APIs
>Then, following these side effects, I suppose it would be more reasonable to implement the Python gRPC library you're publishing instead of trying to implement the REST-API. We actually have reasons to believe python's gRPC implement is not great and some folks have even had better performance with the HTTP Gateway
does not hurt to test both strategies
10 Views