# REST API 설계 (Go) > REST 원칙, 버전 관리, 페이지네이션, 필터링, HATEOAS, 상태 코드, OpenAPI/Swagger - 20 면접 질문 - Mid-Level - [면접 질문: Go](https://sharpskill.dev/ko/technologies/go/interview-questions.md) ## 1. REST의 기본 원칙은 무엇입니까? **답변** REST는 고유한 URI를 통해 접근할 수 있는 리소스를 표현한다는 원칙에 기반합니다. 각 리소스(사용자, 제품, 주문)는 URI를 가지며 표준 HTTP 동사(GET, POST, PUT, DELETE)를 통해 조작할 수 있습니다. 이 리소스 중심 패러다임은 서버가 클라이언트 세션 상태를 저장하지 않는 확장 가능하고 느슨하게 결합된 아키텍처를 가능하게 합니다. ## 2. 리소스의 멱등한 전체 업데이트 작업에는 어떤 HTTP 메서드를 사용해야 합니까? **답변** PUT는 멱등하며 리소스를 완전히 교체합니다. 동일한 데이터로 PUT를 여러 번 호출해도 한 번 호출한 것과 같은 결과가 나옵니다. 반면 POST는 멱등하지 않고(여러 리소스를 생성함), PATCH는 부분 업데이트를 수행하며, DELETE는 리소스를 삭제합니다. PUT의 멱등성은 네트워크 오류 시 재시도의 안전성을 보장합니다. ## 3. 새 리소스를 성공적으로 생성한 후 어떤 HTTP 코드를 반환해야 합니까? **답변** 201 Created 코드는 리소스가 성공적으로 생성되었음을 나타냅니다. 새 리소스의 URI를 가리키는 Location 헤더가 함께 제공됩니다. 200 OK 코드는 생성에 너무 일반적이고, 204 No Content는 응답 본문이 없을 때 사용하며, 202 Accepted는 아직 완료되지 않은 비동기 처리를 나타냅니다. ## 17개 추가 질문 이용 가능 - REST API와 RPC API를 구별하는 주요 차이점은 무엇입니까? - REST에서 statelessness 원칙은 무엇을 의미합니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Go 면접 주제 - [Go 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/go-basics.md): 25개 질문, Junior - [Go 데이터 구조](https://sharpskill.dev/ko/technologies/go/interview-questions/go-data-structures.md): 20개 질문, Junior - [Go 인터페이스](https://sharpskill.dev/ko/technologies/go/interview-questions/go-interfaces.md): 18개 질문, Junior - [에러 처리](https://sharpskill.dev/ko/technologies/go/interview-questions/error-handling.md): 20개 질문, Junior - [Goroutine 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/goroutines-basics.md): 20개 질문, Junior - [Channels](https://sharpskill.dev/ko/technologies/go/interview-questions/channels.md): 22개 질문, Junior - [Go Modules](https://sharpskill.dev/ko/technologies/go/interview-questions/go-modules.md): 18개 질문, Mid-Level - [HTTP 서버](https://sharpskill.dev/ko/technologies/go/interview-questions/http-server.md): 24개 질문, Mid-Level - [HTTP 클라이언트](https://sharpskill.dev/ko/technologies/go/interview-questions/http-client.md): 18개 질문, Mid-Level - [JSON 인코딩](https://sharpskill.dev/ko/technologies/go/interview-questions/json-encoding.md): 20개 질문, Mid-Level - [Database/SQL](https://sharpskill.dev/ko/technologies/go/interview-questions/database-sql.md): 22개 질문, Mid-Level - [context 패키지](https://sharpskill.dev/ko/technologies/go/interview-questions/context-package.md): 20개 질문, Mid-Level - [Testing](https://sharpskill.dev/ko/technologies/go/interview-questions/testing.md): 22개 질문, Mid-Level - [동시성 패턴](https://sharpskill.dev/ko/technologies/go/interview-questions/concurrency-patterns.md): 24개 질문, Mid-Level - [동기화 프리미티브](https://sharpskill.dev/ko/technologies/go/interview-questions/sync-primitives.md): 22개 질문, Mid-Level - [Go 웹 프레임워크](https://sharpskill.dev/ko/technologies/go/interview-questions/go-web-frameworks.md): 20개 질문, Mid-Level - [gRPC](https://sharpskill.dev/ko/technologies/go/interview-questions/grpc.md): 22개 질문, Mid-Level - [Reflection](https://sharpskill.dev/ko/technologies/go/interview-questions/reflection.md): 20개 질문, Senior - [메모리 관리](https://sharpskill.dev/ko/technologies/go/interview-questions/memory-management.md): 24개 질문, Senior - [성능 최적화](https://sharpskill.dev/ko/technologies/go/interview-questions/performance-optimization.md): 22개 질문, Senior - [Generics](https://sharpskill.dev/ko/technologies/go/interview-questions/generics.md): 20개 질문, Senior - [Go Design Patterns](https://sharpskill.dev/ko/technologies/go/interview-questions/design-patterns.md): 24개 질문, Senior - [Microservices](https://sharpskill.dev/ko/technologies/go/interview-questions/microservices.md): 24개 질문, Senior - [보안 및 인증](https://sharpskill.dev/ko/technologies/go/interview-questions/security-authentication.md): 24개 질문, Senior - [Docker & Containerization](https://sharpskill.dev/ko/technologies/go/interview-questions/docker-containerization.md): 20개 질문, Senior - [Kubernetes Basics](https://sharpskill.dev/ko/technologies/go/interview-questions/kubernetes-basics.md): 22개 질문, Senior - [고급 Go](https://sharpskill.dev/ko/technologies/go/interview-questions/advanced-go.md): 20개 질문, Senior - [CLI 개발](https://sharpskill.dev/ko/technologies/go/interview-questions/cli-development.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/go/interview-questions/rest-api-design