Generated by GPT-5-mini| API | |
|---|---|
| Name | Application Programming Interface |
| Caption | Diagram of client–server interactions via an interface |
| Developer | Sun Microsystems; Microsoft; Oracle Corporation |
| Introduced | 1968 |
| Type | Software interface |
API
An application programming interface is a set of routines, protocols, and tools that enables software components to communicate. It mediates interactions between clients and services, enabling integration across platforms, libraries, and operating environments. APIs underpin modern software ecosystems from cloud platforms to mobile applications.
APIs define contracts that specify inputs, outputs, error handling, and behavior for software components. They serve purposes in modularization, reuse, and interoperability among systems such as Amazon Web Services, Google Cloud Platform, Microsoft Azure, Apple Inc. platforms, and Linux environments. Well-documented interfaces accelerate development in projects like Apache HTTP Server, Docker, Kubernetes, Node.js, and React (JavaScript library) by enabling third parties to build on existing capabilities.
Public or external APIs expose functionality to third parties, as seen with Twitter and Facebook developer platforms; partner APIs are restricted to business collaborators, used by companies like Stripe and PayPal for payments; internal APIs facilitate modular architectures within organizations such as Netflix and Spotify. Architectural style distinctions include RESTful interfaces popularized alongside Roy Fielding's work, RPC-style protocols like gRPC from Google, and message-driven approaches using AMQP or Apache Kafka. Other forms include library APIs in environments such as Java (programming language), system call interfaces in Unix, and hardware interfaces driven by vendors such as Intel and ARM Holdings.
Design favors clear contracts, idempotence, discoverability, and backward compatibility. REST emphasizes resource-oriented URIs and uniform methods, influenced by the HTTP specification and implemented in systems like Amazon S3 and GitHub. Graph-based choices such as GraphQL (introduced by Facebook) allow client-driven queries, while hypermedia-driven approaches draw on Hypertext Transfer Protocol concepts. Architectural patterns include monolithic, microservices as adopted by Amazon and Netflix, and event-driven architectures used by Uber and LinkedIn. Documentation tools like OpenAPI Specification and tooling ecosystems from Swagger and Postman support design-first or code-first workflows.
APIs require controls to protect data and operations, including authentication, authorization, encryption, and auditing. Protocols like OAuth and OpenID Connect are widely used for delegated access by platforms such as Google and Microsoft. Transport security relies on Transport Layer Security implementations promoted by IETF standards and major vendors like Apple Inc. and Mozilla Foundation. Threat mitigation includes rate limiting, input validation, and token management strategies used by providers like Cloudflare and Akamai to defend against abuse and denial-of-service incidents.
Managing API evolution balances stability with innovation through versioning strategies (URL versioning, header-based versions) employed by organizations including Twitter, Stripe, and GitHub. Deprecation policies, changelogs, and migration guides reduce client disruption; governance models and API gateways from vendors such as IBM and Oracle Corporation centralize lifecycle control. Testing practices involving continuous integration services like Jenkins and GitLab quality pipelines support safe deployments and rollback procedures.
Performance tuning involves caching, pagination, and request batching techniques used by services like Content Delivery Network operators and large-scale platforms YouTube and Netflix. Monitoring and observability rely on metrics, traces, and logs collected by systems like Prometheus, Grafana Labs, and Datadog to detect latency and errors. Rate limiting, throttling, and quota management prevent resource exhaustion; implementations in services such as Google Cloud and AWS API Gateway enforce policies and provide analytics.
APIs carry contractual, licensing, and monetization implications; terms of service and developer agreements from companies like Twitter, Google, and Facebook govern acceptable use. Intellectual property, data protection regulations such as General Data Protection Regulation and California Consumer Privacy Act affect design and compliance. Business strategies include platformization, developer ecosystems exemplified by Salesforce and Shopify, and revenue models based on freemium tiers, transaction fees, or usage-based billing used by Twilio and Stripe.