Posts in category 'Web APIs'

Build a RESTful Web Service with Spring Boot, Gradle, and OpenAPI

By the end of this guide you’ll have a working Spring Boot RESTful API, built with Gradle and documented with OpenAPI, and a live Swagger UI page you can show...

Generate a Spring Boot Server from an OpenAPI Spec with Swagger Codegen

You’ve designed your API. Now comes the boring part: writing controllers, models and request mappings that only repeat what the spec already says. Swagger Codegen writes that code for you....

Design-First APIs with OpenAPI 3: A Step-by-Step Tutorial

Most API problems aren’t coding problems. They’re design problems found too late: a missing field, an inconsistent name, an error nobody documented. Design-first fixes that by agreeing on the contract...

Load-Test Your API's Rate Limiting with Concurrent Java Clients

Your API has rate limiting. But does it actually work when several clients hammer different endpoints at the same time, on Black Friday? You don’t want to find out in...

REST API Tutorial: Resources, HTTP Methods, Status Codes and a Spring Boot Example

A restaurant app needs a supplier’s food prices; the supplier’s system needs the restaurant’s orders. Two companies, two technologies, no shared code, and REST is how they talk. This tutorial...

Rate Limiting in Spring Boot with Bucket4j: Token Bucket Algorithm per Client

A partner company starts integrating with your API. On day one, their developer writes a loop to load test data, and suddenly your API answers slowly for every other client....

How a REST Client Should Handle 503 Service Unavailable: Retries with Backoff in Spring

Your nightly job sends 50,000 articles to a partner’s API, in batches of 1,000. At batch 23, the API answers 503 Service Unavailable. What should your client do? Give up,...

Fix 'Received fatal alert: handshake_failure' in Java: SSL/TLS Troubleshooting

Your Java client calls an HTTPS API and fails before sending a single request:

Secure a Spring Boot REST API with OAuth2 and OpenAPI (Swagger UI)

Your REST API is documented with OpenAPI, and anyone who finds the URL can call it. This tutorial secures it with OAuth2: clients get a short-lived access token and send...

Documenting a SpringBoot REST API with OpenAPI 3

The main idea for documenting our back-end RESTful APIs is to communicate to third-party developers what our endpoints are doing.