0
API
AM NOT UNDERSTANDING API
5 Respostas
+ 3
ANUBIS DIGITAL https://cdn.zapier.com/storage/learn_ebooks/e06a35cfcf092ec6dd22670383d9fd12.pdf
and actual programming examples in nodejs: https://www.w3schools.com/nodejs/nodejs_rest_api.asp
and python: https://auth0.com/blog/developing-restful-apis-with-python-and-flask/
there are plenty pf education materials online if u just google.
Adesh Devil It's inappropriate to beg for follows in exchange for answers. Either provide a valid response or refrain from answering at all.
0
I will help you to understand api but you have to follow je to become friends..
0
[1/4]
ANUBIS DIGITAL , API, as you might already know, stands for Application Programming Interface.
Think of it as a set of rules, commands and data formats that one program can use to talk to i.e. interract with another program.
It specifies what functions are available (e.g., get data, send data, etc.), how to request them (the exact format, parameters and method) and what you will receive (e.g., data structure, error messages, etc.).
Both sides agree on the same "language" (protocols, request formats, and response formats).
Without APIs, different pieces of software would have to know everything about each other’s internal workings. That would make systems rigid, hard to maintain, and difficult to connect.
APIs limit what can be accessed for security and stability.
You use the API without needing to know the internal code or database structure. It also hides complexity.
0
[2/4]
ANUBIS DIGITAL told me in direct message that he needed help specifically with Web APIs. I have answered his questionz this is for anyone else who might need it:
A Web API is an API that is accessible over the internet (usually via HTTP or HTTPS).
It allows applications to request or send data to another system, often using URLs (endpoints) and returning data in a standard format such as JSON or XML.
So, a typicall flow of the Web API would be:
Step 1. Client sends a request to the API’s endpoint, which is a specific URL for a resource or an action.
Step 2. The API processes the request (accesses databases, runs code, gathers data).
Step 3. The API sends back a response, which is usually a JSON object with the requested data.
Now, coming to it's structure.
The starting point of all API requests is the base URL. It's a common part of all endpoints. Note that this alone cannot do anything and is NOT SAME as the ENDPOINT.
For example, https://api.example.com
0
[3/4]
ENDPOINTS are the paths added to the base URL to access specific resources or actions.
Each endpoint represents a specific data set or function.
For example:
GET https://api.example.com/users/123
[Here, /users means all users and /users/123 together refers to the details of user with ID 123.]
APIs contain HTTP Methods to Indicate the type of action.
GET (as in the previous example) is used to retrieve or "get" data while POST is used to send (or "post") data.
[E.g., POST https://api.example.com/users would create a new user. (Get would have accessed information about all rhe users from a database) ]
PUT / PATCH is used to update data while DELETE is used to remove or "delete" data.