Skip to main content

gRPC API

Auditum offers classic HTTP/JSON API and modern gRPC API. Both types of API provide the same features, but gRPC is more efficient, easier to integrate with, and it is recommended for better performance and developer experience.

This page describes how to use Auditum gRPC API.

Protobuf

Auditum gRPC API is defined in Protobuf. The definitions are well-documented and available in the same repository. The generated code is available for Go, and you can generate it for any other language. See the official guide for your language.

Try it out

To try out Auditum gRPC API, you can use grpcurl.

Let's demonstrate how to create a project.

Example request:

grpcurl \
-plaintext \
-d @ \
localhost:9090 \
auditumio.auditum.v1alpha1.ProjectService/CreateProject \
<<EOM
{
"project": {
"display_name": "My Great Project"
}
}
EOM

Example response:

{
"project": {
"id": "01886e86-1963-7f3c-b672-b5d93cec6c6e",
"createTime": "2023-05-30T21:17:42.115752Z",
"displayName": "My Great Project"
}
}

Let's check that the project was created.

Example request:

grpcurl \
-plaintext \
-d @ \
localhost:9090 \
auditumio.auditum.v1alpha1.ProjectService/ListProjects \
<<EOM
{}
EOM

Example response:

{
"projects": [
{
"id": "01886e86-1963-7f3c-b672-b5d93cec6c6e",
"createTime": "2023-05-30T21:17:42.115752Z",
"displayName": "My Great Project"
}
]
}