Please enable JavaScript.
Coggle requires JavaScript to display documents.
Application Programming Interface (API) - Coggle Diagram
Application Programming Interface (API)
APIs
Definition: Interface for software/hardware communication
Communication structure: Requests & Responses
Benefits
Access information
Hide application complexity
Extend functionality
Security
RESTful APIs
Definition: APIs following REST architecture
HTTP methods
GET: Retrieve data
POST: Submit data
PUT: Update data
DELETE: Delete data
Others: HEAD, PATCH, OPTIONS
Endpoints
URL/URI representing the resource
Combine endpoint with HTTP method to create API
Postman
Definition: Platform for API development
Usage
Send requests to servers
Receive responses from servers
Test API endpoints
CRUD Operations with Express
Definition: Create, Read, Update, Delete
Mapping to HTTP methods
Create → POST
Read → GET
Update → PUT
Delete → DELETE
Creating API endpoints
Specify HTTP method and endpoint
Callback function with parameters
request: access received data
response: send data back to client
Response can include status codes and headers