What is it?
API stands for Application Programming Interface.
An API defines how one software system can request data or actions from another.
Simple Definition:
An API is a defined way for software systems to communicate.
Software Knowledge → 03 · HTTP & APIs → API
A defined interface that allows software systems to exchange data and actions.
API stands for Application Programming Interface.
An API defines how one software system can request data or actions from another.
Simple Definition:
An API is a defined way for software systems to communicate.
Think of an API as a service menu.
The menu tells you:
Software version:
An API can allow software to:
APIs are used between:
GET /api/ordersPurpose:
Retrieve orders.
POST /api/ordersPurpose:
Create a new order.
The method describes the action.
The endpoint identifies the API resource.
The API defines the available interface.
HTTP commonly carries the request and response.
A collection of defined functions or resources available to other software.
One specific access point inside an API.
API = The interface
Endpoint = One address inside the interface
| ENGLISH TERM | 中文 | SIMPLE ENGLISH | 中文小白理解 |
|---|---|---|---|
| API | 应用程序接口 | A defined way for software systems to communicate. | 让不同软件系统按照约定交换数据和调用功能的接口。 |
| Endpoint | 接口地址 | A specific address that provides one API function. | API 中提供某个具体功能的访问地址。 |
| Method | HTTP 方法 | The action an API request wants to perform. | API 请求想执行的操作类型。 |
| Request | 请求 | Data or instructions sent to an API. | 客户端发送给 API 的数据或操作请求。 |
| Response | 响应 | Data or a result returned by an API. | API 处理请求后返回的数据或结果。 |
| Resource | 资源 | Data or an object exposed through an API. | API 对外提供访问的数据或业务对象。 |
| Client | 客户端 | Software that calls an API. | 发起 API 调用的软件一端。 |
| Backend | 后端 | Software that commonly processes API requests. | 通常负责处理 API 请求的软件部分。 |
| HTTP | HTTP 协议 | A common protocol used to call web APIs. | Web API 常用的基础通信协议。 |
| JSON | JSON 数据格式 | A common format used for API data. | API 请求和响应中常用的结构化数据格式。 |
| API Documentation | API 文档 | Documentation describing how to use an API. | 说明接口如何调用、传什么、返回什么的文档。 |
An API defines how software systems communicate.
An API usually contains multiple endpoints.
Web APIs commonly use HTTP requests and responses.
Final:
Client → API → Service