API is a very broad term. Generally, it’s how one piece of code talks to another. In web development API often refers to the way in which we retrieve information from an online service. The API documentation will give you a list of URLs, query parameters, and other information on how to make a request from the API, and inform you what sort of response will be given for each query.
Rest is a set of rules/standards/guidelines for how to build a web API. Since there are many ways to do so, having an agreed-upon system of structuring an API saves time in making decisions when building one, and saves time in understanding how to use one.
Endpoint on the other hand, endpoint is the place off interaction between applications. Endpoint is a URL that enables the API to gain access to resources on a server.In simple terms, an endpoint is the the point of entry in a communication channel when two systems are interacting. It refers to touch points of the communication between an API and a server. API operate through “Request” & “Response”.