# Path operations and HTTP methods

> What is a path operation in FastAPI, and how do you define endpoints for GET, POST, PUT, PATCH and DELETE?

Canonical: https://www.internhack.in/learn/interview/fastapi-interview/fastapi-path-operations
Last updated: 2026-11-28

Difficulty: Beginner

## Question

What is a path operation in FastAPI, and how do you define endpoints for GET, POST, PUT, PATCH and DELETE?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

path operations, HTTP methods, decorators, status_code, route order

Previous: [What is FastAPI and what makes it stand out?](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-intro) · Next: [Path parameters vs query parameters](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-path-query-params) · [All of FastAPI Interview](https://www.internhack.in/learn/interview/fastapi-interview)

## More FastAPI Interview questions

- [Pydantic models and request body](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-pydantic-models)
- [Response models and response filtering](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-response-model)
- [Dependency Injection in FastAPI](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-dependency-injection)
- [Async vs sync route handlers](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-async-routes)
- [Authentication and JWT in FastAPI](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-authentication)
- [Error handling and HTTPException](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-error-handling)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [FastAPI Interview](https://www.internhack.in/learn/interview/fastapi-interview)
