To learn how to install and run Flipt, see the Installation documentation.

Once you have the Flipt server up and running within your infrastructure, the next step is to integrate the Flipt client(s) with your applications that you would like to be able to use with Flipt.

You have two options to communicate with the Flipt server:

  1. REST API
  2. GRPC API

We’ve also developed several clients in various languages for easier integration.

REST API

Flipt also comes equipped with a fully functional REST API. The Flipt UI is completely backed by this same API. This means that anything that can be done in the Flipt UI can also be done via the REST API.

The Flipt REST API can also be used with any language that can make HTTP requests. This means that you don’t need to use one of the above GRPC clients to integrate your application with Flipt.

The latest version of the REST API is fully documented using the OpenAPI v3 specification as well as the above API Reference.

REST Clients

Official Clients

Official Flipt REST clients are currently available in the following languages:

Generate

You can use openapi-generator to generate client code in your preferred language from the Flipt OpenAPI v3 specification.

While generating clients is outside of the scope of this documentation, an example of generating a Java client with the openapi-generator is below.

Java Example

  1. Install openapi-generator
  2. Generate using openapi-generator-cli to desired location:
openapi-generator generate -i openapi.yml -g java -o /tmp/flipt/java

GRPC Clients

Since Flipt is a GRPC enabled application, you can use a generated GRPC client for your language of choice.

An example Go application is available, showing how you would integrate with Flipt using the Go GRPC client.

Official Clients

Official Flipt GRPC clients are currently available for the following languages:

If your language isn’t listed, please see the section below on how to generate a native GRPC client manually. If you choose to open-source this client, please submit a pull request so that we can add it to the docs.

Generate

If a GRPC client in your language isn’t available for download, you can easily generate it yourself using the existing protobuf definition. The GRPC documentation has extensive examples of how to generate GRPC clients in each supported language.

GRPC generates both client implementation and server interfaces. To use Flipt you only need the GRPC client implementation and can ignore the server code as this is implemented by Flipt itself.

Below are two examples of how to generate Flipt clients in both Go and Ruby.

Go Example

  1. Follow the setup instructions on the GRPC website.
  2. Generate using protoc to desired location:
protoc -I ./rpc --go_out=plugins=grpc:/tmp/flipt/go ./rpc/flipt.proto
cd /tmp/flipt/go/flipt
ls
flipt.pb.go          flipt_pb.rb          flipt_services_pb.

Ruby Example

  1. Follow the setup instructions on the GRPC website.
  2. Generate using protoc to the desired location:
grpc_tools_ruby_protoc -I ./rpc --ruby_out=/tmp/flipt/ruby --grpc_out=/tmp/flipt/ruby ./rpc/flipt.proto
cd /tmp/flipt/ruby
ls
flipt_pb.rb          flipt_services_pb.rb