Java

At present, we regret to inform you that the Java SDK is not yet available for integration. However, we are pleased to announce that its development is on our roadmap. The prioritization of the Java SDK largely depends on the needs of our existing and new customers. We anticipate its readiness within approximately one week from the moment it is assigned priority status.

In the meantime, you can use the API directly to evaluate flags.

Getting all active flags in a single API call

You can get all active flags for a context in a single API call. The response will contain all active flags for that context.

cURL
Java
curl 'https://api.tggl.io/flags' \
  -H 'Content-Type: application/json' \
  -H 'x-tggl-api-key: <api key>' \
  --data-raw '{"userId":"foo","email":"foo@gmail.com"}'

You can also batch evaluate multiple contexts in a single API call by passing an array of contexts in the request body.

Read the documentation that explains the fundamental principles of evaluating flags via the API, and read the API specifications for more information on how to parse the response.

Evaluate flags locally

You can also evaluate flags locally by fetching the configuration and evaluating the flags in your application. You can fetch the configuration of all flags in a single API call:

cURL
Java
curl 'https://api.tggl.io/config' \
  -H 'x-tggl-api-key: <server api key>'

Read the documentation that explains the fundamental principles of evaluating flags locally, and read the API specifications for more information about the API call itself. We provide full examples in other languages and pre-written unit tests to check your implementation against.

Report usage to Tggl for monitoring

Reporting flag usage to Tggl allows you to track which flags res being used and which aren't. Tggl then uses this data to help you manage technical debt by automatically classifying flags that require your attention.

cURL
Java
curl 'https://api.tggl.io/report' \
  -H 'Content-Type: application/json' \
  -H 'x-tggl-api-key: <api key>' \
  --data-raw '{}'

Read the API specifications for more information about the API call itself.