StackPractices

api

Practical resources about api for software engineers.

102 results

Building Robust APIs

APIs are the contract between systems. Whether you are exposing a public REST endpoint, designing an internal GraphQL schema, or integrating with a third-party service, the patterns you choose determine reliability, performance, and developer experience.

Here you will find recipes for handling CORS, implementing pagination, versioning endpoints, managing rate limits, and documenting APIs with OpenAPI. Each example includes runnable code in multiple languages so you can adapt it to your stack immediately.

intermediate

API Error Response Template

A reusable template for consistent, informative, and developer-friendly API error responses that...

beginner

API Status Page Template for Incidents

A template for a public API status page that communicates uptime, incidents, and maintenance...

intermediate

API Testing Strategy Template

A template for planning contract tests, integration tests, and load tests for APIs.

advanced

OpenAI API Guide: Python Examples for Production

Production guide to the OpenAI API: Responses API, chat completions, streaming, function calling,...

intermediate

Complete Guide to API Versioning Strategies

Compare URI, header, query-param and content-negotiation versioning for REST, plus GraphQL schema...

advanced

Complete Guide to GraphQL Federation

Build unified GraphQL APIs across multiple services with Apollo Federation. Covers subgraphs,...

advanced

GraphQL Federation in Production

Run federated GraphQL in production: subgraph ownership, router HA, query planning, persisted...

advanced

Complete Guide to GraphQL Schema Design

Design GraphQL schemas that evolve without breaking clients. Type design, connections, mutations,...

advanced

Complete Guide to GraphQL Security

Secure a production GraphQL API: introspection control, depth and cost limits, rate limiting,...

advanced

Complete Guide to GraphQL Testing

Test GraphQL APIs at every layer: resolver unit tests, schema integration tests, contract and...

intermediate

REST API Design Guide

A thorough guide to designing clean, scalable, and maintainable REST APIs.

advanced

API Gateway Design: Resilience, Routing, and Security

A practical guide to designing API gateways: routing, authentication, rate limiting, circuit...

intermediate

Complete Guide to Microservices Communication

Compare sync vs async communication patterns for microservices. Covers REST, gRPC, message queues,...

intermediate

GraphQL vs REST — When to Choose and How to Migrate

A decision guide comparing GraphQL and REST APIs: use cases, performance, caching, tooling, and...

advanced

gRPC in Microservices — High-Performance RPC Guide

A practical guide to gRPC for microservices: Protocol Buffers, streaming, load balancing, and...

intermediate

API Rate Limiting — Design Fair and Useful Throttling

A practical guide to API rate limiting: token bucket, leaky bucket, sliding window algorithms,...

intermediate

API Security Checklist — Authentication to Encryption

A thorough security checklist for APIs: authentication, authorization, input validation, rate...

advanced

Complete Guide to API Security

Secure your APIs end-to-end: rate limiting, auth, input validation, CORS, injection prevention,...

advanced

Complete Guide to Authentication Patterns

Implement production authentication: JWT, OAuth2, sessions, passkeys, MFA, SAML and OIDC SSO, RBAC...

advanced

Complete Guide to OWASP Top 10 2025

Mitigate each risk in the OWASP Top 10 2025 list with practical code examples. Covers the new...

No results found.