Quick Answer

An endpoint is the URI that references an accessible resource on a server. In the context of web APIs, an endpoint references specific code that handles the request and returns an appropriate response.

Digging Deeper

Endpoints and URIs are technology synonymous and are thus used interchangeably. However, it is common for web API documentation to use the term endpoint when it only wants to provide URI paths. For instance:

MethodEndpointPurpose

POST

/customersCreate a new customer.
GET/customers/{ID}Read a specified customer .
PUT/customers/{ID}Update a specified customer.
DELETE/customers/{ID}Delete a specified customer.

In this format, the host portion of the URI (e.g., https://www.examples.org) is removed and only the path is referenced (e.g., /customers). The host information is usually documented elsewhere. Often multiple hosts are listed (e.g., one for testing and one for production) which makes documenting endpoints only with path information more sensible.

  • No labels