Home/Glossary/API Endpoint

API Endpoint

A specific URL where an API can be accessed, representing a function or resource in a web service.

Web TechnologiesAlso called: "rest endpoint", "api route"

API endpoints are the touchpoints where clients interact with server functionality.

Endpoint structure

  • Base URL: https://api.example.com
  • Path: /v1/users/123
  • Method: GET, POST, PUT, DELETE, PATCH
  • Parameters: Query strings, path params, body

RESTful conventions

  • GET /users - List all users
  • GET /users/123 - Get user 123
  • POST /users - Create new user
  • PUT /users/123 - Update user 123
  • DELETE /users/123 - Delete user 123

Best practices

  • Use nouns for resources, verbs for actions.
  • Version your APIs (/v1/, /v2/).
  • Return appropriate HTTP status codes.
  • Document with OpenAPI/Swagger.
  • Implement rate limiting.

Security

  • Authenticate requests (OAuth, API keys, JWT).
  • Validate all input data.
  • Use HTTPS for all endpoints.
  • Implement CORS policies.