Application Programming Interface for utilizing functions from another website.
How They Work
!how-APIs-work.png Private or Broken Links
The page you're looking for is either not available or private!
SOAP Private or Broken Links
The page you're looking for is either not available or private!
APIs
These APIs use Simple Object Access Protocol. Client and server exchange messages using XML. This is a less flexible API that was more popular in the past.
RPC APIs
These APIs are called Remote Procedure Calls. The client completes a function (or procedure) on the server, and the server sends the output back to the client.
Websocket APIs
Websocket API is another modern web API development that uses JSON objects to pass data. A WebSocket API supports two-way communication between client apps and the server. The server can send callback messages to connected clients, making it more efficient than REST API.
REST Private or Broken Links
The page you're looking for is either not available or private!
APIs
These are the most popular and flexible APIs found on the web today. The client sends requests to the server as data. The server uses this client input to start internal functions and returns output data back to the client. Let’s look at REST APIs in more detail below.
API ParadigmsAPI Paradigms
SOAP vs. REST
APIs exchange instructions and data, which necessitates explicit protocols and architectures – the rules, structures, and limitations that govern the functioning of an API. When disc... will explain in more detail SOAP vs REST APIs.
[!API-actions] There are four types of API actions
- GET: requests data from a server
- POST: sends new information to a server
- PUT: makes changes to existing data on a server
- DELETE: removes existing data from a server
Security
1. NEVER paste an API key directly into your code.
2. Instead, paste them into a .env file.
3. Make sure the .env file is added to your gitignore list.
4. Place the env file in a proxy so keys aren't injected by the $var into the src
REST#How to secure a REST API? | How to secure a REST API Private or Broken Links The page you're looking for is either not available or private! |
Express to handle api Express-rate-limit to stop a rate limit attack Express-slow-down to inrease wait time between api calls each time
Resources
Comprehensive API explanation [Insomnia] for designing, debugging, and testing APIs Postman is another option for building and designing APIs
Hapi/Joi - Schema validation library to make sure information is coming in the right format. Important to keep input data for a DB to not collect a bunch of errors. Quality in, quality out. Monk - Allows Talk to MongoDB