# Web API

## 😢 ปัญหา

เราเคยเจอกันป่ะว่า โปรแกรมที่เราเขียนอยู่เวลาจะไปติดต่อกับโปรแกรมอื่นๆ มันจะมีเรื่องวุ่นวายที่ต้องมาคอยนัดคุยกันเพื่อตกลงกันว่าโปรแกรมของเรากับโปรแกรมของเขาจะทำงานร่วมกันได้ยังไง และปัญหาโลกแตกนี้จะยิ่งถาโถมเข้ามาอีกถ้าโปรแกรมที่เรารับผิดชอบต้องไปติดต่อกับโปรแกรมบริษัทอื่นหลายๆบริษัทด้วย ชีวิตเราคงได้แต่นั่งจมปลักไปกับการเข้าประชุมเพื่อคุยกันว่าจะให้โปรแกรมมันทำงานร่วมกันยังไงแน่นอน แล้วอย่างนี้พวก Paypal, Facebook, Twitter เขาทำยังไงกันล่ะ เพราะคนที่มาติดต่อทำงานกับโปรแกรมของพวกเขานั้นมีเป็นล้านๆบริษัททั่วโลกเลย ทำไมเขายังมีเวลาไปพัฒนาโปรแกรมเขาได้อยู่ไม่ได้มานั่งจมปลักกับการประชุมกันล่ะ ?

## 😄 วิธีแก้ปัญหา

โดยปรกติแล้วการที่เราจะเปิดช่องเพื่อให้โปรแกรมของเราสามารถทำงานร่วมกับโปรแกรมอื่นๆได้ เราจะเปิดสิ่งที่เรียกว่า API นั่นเอง แต่ในโลกของ API นั้นจริงๆมีเยอะมากมายเลยซึ่งมาจากคอนเซ็ปที่เรียกกันว่า Service-Oriented Programming หรือที่เราเรียกย่อๆกันว่า SOP นั่นเองครับ ซึ่งในคอร์สนี้เราจะมาพูดถึงการทำงานที่อยู่บนพื้นฐานของเว็บ ซึ่งเป็นวิธีที่นิยมกันทั่วโลกเพราะคอมพิวเตอร์ทุกตัวสามารถทำงานกับเว็บไซต์ได้นั่นเอง

## 🧭 ความรู้ในการจัดการปลาตัวนี้

{% content-ref url="/pages/-LmVADIFJDtBLosq2Sxo" %}
[1.Web API คืออะไร](/web/web-api-101/intro.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmVCY2Ec5id8S8qSdNy" %}
[2.ติดตั้ง .NET Core SDK](/web/web-api-101/net-core-sdk.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmVEIlhaRbIrJhP4cgB" %}
[3.สร้าง Web API ตัวแรกกัน](/web/web-api-101/create-your-web-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmVG4kn2jf8hV85HTgx" %}
[4.Verbs](/web/web-api-101/verbs.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmVR1J-RfkMXl7bRjBZ" %}
[5.Swagger เพื่อคู่ API](/web/web-api-101/swagger.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmVT3kpIrAhhjcf0n4F" %}
[6.การใช้ Model](/web/web-api-101/modeling.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmVXrycrGfJECWo-M-N" %}
[7.เรียก Web API ผ่าน Postman](/web/web-api-101/postman.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmV\_4pbkJopzYKOW7FS" %}
[8.มาจัดกลุ่ม API กัน (1/2)](/web/web-api-101/grouping-api-01.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LmVb3vBGcgIkraZCPhv" %}
[9.มาจัดกลุ่ม API กัน (2/2)](/web/web-api-101/grouping-api-02.md)
{% endcontent-ref %}

## 🎥 วีดีโอทั้งหมดของคอร์สนี้

[@Youtube Web API](https://www.youtube.com/playlist?list=PLUjAn8nwWniheN3OLy6i7xu1VYq4Tzj7p)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.saladpuk.com/web/web-api-101.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
