Skip to content

Commit

Permalink
Flesh out documentation of clients
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat15 committed Sep 18, 2024
1 parent 7dc75a4 commit db90190
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion pages/spicedb/getting-started/client-libraries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SpiceDB is primarily accessed by a [gRPC] API and thus client libraries can be generated for any programming language.

AuthZed builds and maintains client libraries for the following languages:
AuthZed builds and maintains gRPC client libraries for the following languages:

- [Go](https://github.com/authzed/authzed-go)
- [Node](https://github.com/authzed/authzed-node)
Expand All @@ -11,6 +11,29 @@ AuthZed builds and maintains client libraries for the following languages:
- [Java](https://github.com/authzed/authzed-java)
- [Dotnet](https://github.com/authzed/authzed-dotnet)

Because the above libraries are generated from protobuf definitions in our [API repo],
the primary documentation for the gRPC API is in the [buf documentation] for SpiceDB's services.
The gRPC client documentation associated with each host language will also be helpful for putting together invocations.
Additionally, there are `example` directories in the client libraries that provide example usages.

## HTTP Clients

SpiceDB exposes an HTTP API when run with the `--http-enabled` flag.
While Authzed doesn't officially maintain HTTP client libraries, there are [OpenAPI] docs available
both in [the authzed-go git repo](https://github.com/authzed/authzed-go/blob/main/proto/apidocs.swagger.json)
and served by a SpiceDB instance running the HTTP server.
For example:

```sh
docker run --rm -p 50051:50051 -p 8443:8443 authzed/spicedb serve --http-enabled --grpc-preshared-key <preshared key>

curl localhost:8443/openapi.json
```

The OpenAPI JSON can then be converted into a client using a tool like [openapi-ts] or [openapi-python-client].

## Other Clients

AuthZed also develops [zed], a command-line client for interacting with the SpiceDB API.

You can find more languages and integrations maintained by the community in the [Clients section] of the [Awesome SpiceDB] repository.
Expand All @@ -19,3 +42,8 @@ You can find more languages and integrations maintained by the community in the
[zed]: https://github.com/authzed/zed
[clients section]: https://github.com/authzed/awesome-spicedb#clients
[awesome spicedb]: https://github.com/authzed/awesome-spicedb
[api repo]: https://github.com/authzed/api
[buf documentation]: https://buf.build/authzed/api/docs/main:authzed.api.v1
[openapi]: https://www.openapis.org/
[openapi-ts]: https://github.com/hey-api/openapi-ts
[openapi-python-client]: https://github.com/openapi-generators/openapi-python-client

0 comments on commit db90190

Please sign in to comment.