# API Platform (Symfony) > การจัดการ REST ด้วย API Platform: resources, JSON-LD, serialization groups, filters, การแบ่งหน้า, custom operations, OpenAPI - 22 คำถามสัมภาษณ์ - Mid-Level - [คำถามสัมภาษณ์: Symfony](https://sharpskill.dev/th/technologies/symfony/interview-questions.md) ## 1. API Platform ในระบบนิเวศ Symfony คืออะไร? **คำตอบ** API Platform เป็นเฟรมเวิร์กโอเพนซอร์สที่ออกแบบมาเพื่อสร้าง API แบบ REST และ GraphQL โดยเฉพาะ มันผสานรวมกับ Symfony แบบเนทีฟและสร้างเอกสาร OpenAPI อินเทอร์เฟซผู้ดูแลระบบ และ endpoint CRUD จาก entity ของ Doctrine โดยอัตโนมัติ แนวทางนี้ช่วยลดเวลาในการพัฒนา API ลงอย่างมาก ## 2. จะ expose entity ของ Doctrine ให้เป็น resource ของ API Platform ได้อย่างไร? **คำตอบ** ในการ expose entity ให้เป็น resource ของ API Platform เพียงเพิ่มแอตทริบิวต์ #[ApiResource] ลงในคลาส entity แอตทริบิวต์นี้จะบอกให้ API Platform สร้าง endpoint CRUD (GET, POST, PUT, PATCH, DELETE) สำหรับ entity นี้โดยอัตโนมัติ ไม่จำเป็นต้องตั้งค่า route ด้วยตนเอง ## 3. API Platform ใช้รูปแบบข้อมูลใดเป็นค่าเริ่มต้นสำหรับการตอบกลับแบบ REST? **คำตอบ** API Platform ใช้ JSON-LD (JSON for Linked Data) เป็นค่าเริ่มต้น รูปแบบนี้เสริม JSON ด้วยข้อมูลเมตาเชิงความหมายที่อธิบายความสัมพันธ์ระหว่าง resource ชนิดข้อมูล และลิงก์ hypermedia สิ่งนี้ช่วยให้การทำงานร่วมกันและการค้นพบ API โดยอัตโนมัติจากฝั่งไคลเอนต์เป็นไปได้ง่ายขึ้น ## มีอีก 19 คำถาม - จะจำกัดการดำเนินการที่ใช้ได้บน resource ของ API Platform ได้อย่างไร? - serialization groups ใน API Platform มีจุดประสงค์อะไร? สมัครฟรี: https://sharpskill.dev/th/login ## หัวข้อสัมภาษณ์ Symfony อื่นๆ - [PHP สมัยใหม่ (8.1+)](https://sharpskill.dev/th/technologies/symfony/interview-questions/php-modern-features.md): 20 คำถาม, Junior - [พื้นฐาน Symfony](https://sharpskill.dev/th/technologies/symfony/interview-questions/symfony-basics.md): 25 คำถาม, Junior - [Routing & Controllers](https://sharpskill.dev/th/technologies/symfony/interview-questions/routing-controllers.md): 20 คำถาม, Junior - [Twig & Templates](https://sharpskill.dev/th/technologies/symfony/interview-questions/twig-templates.md): 20 คำถาม, Junior - [พื้นฐาน Doctrine ORM](https://sharpskill.dev/th/technologies/symfony/interview-questions/doctrine-orm-basics.md): 25 คำถาม, Junior - [ฟอร์ม Symfony](https://sharpskill.dev/th/technologies/symfony/interview-questions/forms.md): 22 คำถาม, Junior - [การตรวจสอบความถูกต้องของข้อมูล](https://sharpskill.dev/th/technologies/symfony/interview-questions/validation.md): 18 คำถาม, Junior - [Dependency Injection & Services](https://sharpskill.dev/th/technologies/symfony/interview-questions/dependency-injection.md): 24 คำถาม, Mid-Level - [Security & Authentication](https://sharpskill.dev/th/technologies/symfony/interview-questions/security-authentication.md): 26 คำถาม, Mid-Level - [Doctrine ขั้นสูง](https://sharpskill.dev/th/technologies/symfony/interview-questions/doctrine-advanced.md): 24 คำถาม, Mid-Level - [Serializer Component](https://sharpskill.dev/th/technologies/symfony/interview-questions/serializer.md): 20 คำถาม, Mid-Level - [Events & Event Subscribers](https://sharpskill.dev/th/technologies/symfony/interview-questions/events-subscribers.md): 20 คำถาม, Mid-Level - [Console & Commands](https://sharpskill.dev/th/technologies/symfony/interview-questions/console-commands.md): 18 คำถาม, Mid-Level - [Messenger Component](https://sharpskill.dev/th/technologies/symfony/interview-questions/messenger.md): 22 คำถาม, Mid-Level - [HTTP Client](https://sharpskill.dev/th/technologies/symfony/interview-questions/http-client.md): 18 คำถาม, Mid-Level - [Cache & ประสิทธิภาพ](https://sharpskill.dev/th/technologies/symfony/interview-questions/cache.md): 20 คำถาม, Mid-Level - [Workflow Component](https://sharpskill.dev/th/technologies/symfony/interview-questions/workflow.md): 18 คำถาม, Mid-Level - [Testing Symfony](https://sharpskill.dev/th/technologies/symfony/interview-questions/testing.md): 22 คำถาม, Mid-Level - [Mailer Component](https://sharpskill.dev/th/technologies/symfony/interview-questions/mailer.md): 16 คำถาม, Mid-Level - [การแปลและ i18n](https://sharpskill.dev/th/technologies/symfony/interview-questions/translations.md): 16 คำถาม, Mid-Level - [EasyAdmin Bundle](https://sharpskill.dev/th/technologies/symfony/interview-questions/easyadmin.md): 18 คำถาม, Mid-Level - [สถาปัตยกรรม Symfony](https://sharpskill.dev/th/technologies/symfony/interview-questions/architecture-patterns.md): 24 คำถาม, Senior - [ประสิทธิภาพและการเพิ่มประสิทธิภาพ](https://sharpskill.dev/th/technologies/symfony/interview-questions/performance-optimization.md): 22 คำถาม, Senior - [ความปลอดภัยขั้นสูง](https://sharpskill.dev/th/technologies/symfony/interview-questions/security-advanced.md): 22 คำถาม, Senior - [Custom Bundles](https://sharpskill.dev/th/technologies/symfony/interview-questions/custom-bundles.md): 20 คำถาม, Senior - [Microservices ด้วย Symfony](https://sharpskill.dev/th/technologies/symfony/interview-questions/microservices.md): 22 คำถาม, Senior - [Real-time & WebSockets](https://sharpskill.dev/th/technologies/symfony/interview-questions/real-time.md): 18 คำถาม, Senior - [Deployment & DevOps](https://sharpskill.dev/th/technologies/symfony/interview-questions/deployment-devops.md): 20 คำถาม, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/th/technologies/symfony/interview-questions/api-platform