I have a stupid question: How can I
# spicedb
t
I have a stupid question: How can I access the REST API of SpiceDB? I've downloaded the Postman collection, but I fail to make requests against the API. SpiceDB is running in Docker:
Copy code
docker run \
    --name spicedb-testing \
    -p 50051:50051 \
    authzed/spicedb \
    serve-testing
What is the correct port for the REST API? I was trying
http://localhost:50051/v1/permissions/resources
, but I only get
Error: Parse Error: Expected HTTP/
.
v
You don't seem to be exposing the REST API port. It's only exposing port
50051
which is gRPC. The HTTP API port is
:8443
, You also need to enable the REST API, because it's disabled by default. You can do that with
--http-enabled true
argument, or
SPICEDB_HTTP_ENABLED=true
environment variable
t
Thanks again! I found this blog post now (which I somehow missed before), which should also help me: https://authzed.com/blog/authzed-http-api
1 thing I noticed is that "serve-testing" starts the server on port 8081 and "serve" starts it at 8443.
v
oh good find, would you mind opening a Github issue?
you can change the port tho
t
Ok, I will do that.
54 Views