What is an endpoint?
REST APIs focus on resources and how to access those resources.
Resources are accessed through endpoints.
An endpoint is the address (URL), or location, of the resource.
These resources can be accessed through HTTP methods:
GET
- readPOST
- createPUT
- updateDELETE
- delete
The endpoint can include query parameters that specify more information about the representation of the requested resource.
For example, you can specify (in a query parameter) that you want to limit the display to 5 instances of the resource (see example below).
Sample endpoint:
Example
http://apiserver.com/homes?limit=5&format=json
Base path: http://apiserver.com
Endpoint: /homes
Query string parameters: ?limit=5&format=json
Sources
- Documenting APIs: A guide for technical writers and engineers by Tom Johnson
- "What is cURL and how does it relate to APIs?" from IBM Developer