-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262 from authzed/add-client-documentation
Add additional client documentation
- Loading branch information
Showing
3 changed files
with
50 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Official Client Libraries | ||
|
||
SpiceDB is primarily accessed by a [gRPC] API and thus client libraries can be generated for any programming language. | ||
|
||
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) | ||
- [Python](https://github.com/authzed/authzed-py) | ||
- [Ruby](https://github.com/authzed/authzed-rb) | ||
- [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. | ||
|
||
[grpc]: https://grpc.io | ||
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters