Skip to main content

Integration Java

Fusio provides a Java SDK to easily integrate Fusio into your existing Java application.


The following example shows how you can get all registered routes at the backend. A working example is also available at:

package org.fusioproject.sample;

import app.sdkgen.client.TokenStore.MemoryTokenStore;
import app.sdkgen.client.TokenStoreInterface;
import org.fusioproject.sdk.Client;
import org.fusioproject.sdk.backend.BackendRoutesResource;
import org.fusioproject.sdk.backend.CollectionCategoryQuery;
import org.fusioproject.sdk.backend.RouteCollection;

import java.util.ArrayList;
import java.util.List;

public class Main {

public static void main(String[] args) throws URISyntaxException, IOException {
List<String> scopes = new ArrayList<>();
TokenStoreInterface tokenStore = new MemoryTokenStore();

Client client = new Client("", "test", "FRsNh1zKCXlB", scopes, tokenStore);

BackendRoutesResource routes = client.backend().getBackendRoutes();
RouteCollection collection = routes.backendActionRouteGetAll(new CollectionCategoryQuery());

for (int i = 0; i < collection.getEntry().length; i++) {
System.out.println("* " + collection.getEntry()[i].getPath());