A java client for the WebMethods API Gateway REST API.
implementation("io.github.primelib:webmethodsapigateway4j:<latestVersion>")
Click to view instructions for other build tools.
Consumer Specification Approach
APIGatewayConsumerApi client = APIGatewayFactory.create(spec -> {
spec.api(APIGatewayConsumerApi.class);
spec.baseUrl("http://localhost:5555/rest/apigateway");
spec.basicAuth(auth -> {
auth.username("admin");
auth.password("manage");
});
});
APIResponsesModel apis = client.getAPIs(spec -> {
spec.from(0);
spec.size(100);
});
Parameter Approach
APIGatewayApi client = APIGatewayFactory.create(spec -> {
spec.api(APIGatewayApi.class);
spec.baseUrl("http://localhost:5555/rest/apigateway");
spec.basicAuth(auth -> {
auth.username("admin");
auth.password("manage");
});
});
APIResponsesModel apis = client.getAPIs(null, 0, 100);
NOTE: The Parameter Approach
can break if the API changes. The Consumer Specification Approach
is more resilient to API changes.
Released under the MIT License.