An API endpoint is a point at which an application program interface (API) -- the code that allows two software programs to communicate with each other -- connects with the software program. APIs work by sending requests for information from a web application or web server and receiving a response.
In other words, API endpoints are the specific digital location where requests for information are sent by one program and where the resource lives. Endpoints specify where APIs can access resources and help guarantee the proper functioning of the incorporated software. An API's performance depends on its capacity to successfully communicate with API endpoints.
Software programs typically have multiple API endpoints. For example, Instagram has endpoints that include one that allows businesses and creators to measure media and profile interactions; a second endpoint that allows them to moderate comments and their replies; and a third that allows them to discover hashtagged media.
How API endpoints work
Systems that communicate through APIs are integrated systems. One side sends the information to the API and is called the server. The other side, the client, makes the requests and manipulates the API. The server side that provides the requested information, or resources, is the API endpoint.
For an effective request to be processed by the endpoint, the client must provide a uniform resource locator (URL), a method, a list of headers and a body.
Endpoints work in tandem with API methods. Methods are permitted requests that can be made, such as GET, DELETE, PATCH or POST. Methods -- often called verbs in communications syntax -- are often placed just before the specified endpoint in a full URL.
The URL is the simple way for the client to tell the server which resources it wants to interact with.
The code used in placing a request for a specific statistics page on the NBA's web site might read: GET https://stats.nba.com/stats/allstarballotpredictor. In this example "GET" is the method while the endpoint is the specific portion of the web address noted as "/stats/allstarballotpredictor." If, on the other hand, an application is requesting information from Amazon's DynamoDB service, its request may read, "https://dynamodb.us-west-2.amazonaws.com."
Consider the Instagram example further: If a Facebook developer wanted to request metrics on an Instagram Business or Creator Account, the developer would use the Instagram Graph API to query the Instagram metrics endpoint. The request would look something like this: