คุณกำลังดูเอกสารประกอบเดิมสำหรับ Google Photos Library API
เกี่ยวกับ RESTful API
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
REST คือรูปแบบสถาปัตยกรรมซอฟต์แวร์ที่ให้วิธีการขอและแก้ไขข้อมูลที่สะดวกและสอดคล้องกัน
คำว่า REST เป็นคำสั้นๆ ของ "Sentational State Transfer" ในบริบทของ Google APIs หมายถึงการใช้คำกริยา HTTP เพื่อดึงและแก้ไขการนำเสนอข้อมูลที่ Google จัดเก็บไว้
ในระบบ RESTful ทรัพยากรจะจัดเก็บอยู่ในพื้นที่เก็บข้อมูล ไคลเอ็นต์จะส่งคำขอเพื่อให้เซิร์ฟเวอร์ดำเนินการบางอย่าง (เช่น สร้าง เรียก อัปเดต หรือลบทรัพยากร) และเซิร์ฟเวอร์จะดำเนินการดังกล่าวและส่งการตอบกลับ ซึ่งมักอยู่ในรูปแบบเป็นตัวแทนของทรัพยากรที่ระบุ
ใน RESTful API ของ Google ไคลเอ็นต์จะระบุการทำงานโดยใช้คำกริยา HTTP เช่น POST
, GET
, PUT
หรือ DELETE
โดยจะระบุทรัพยากรตาม URI ที่ไม่ซ้ำกันทั่วโลกในรูปแบบต่อไปนี้
https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters
เนื่องจากทรัพยากร API ทั้งหมดมี URI ที่ไม่ซ้ำกันซึ่งเข้าถึง HTTP ได้ REST จะเปิดใช้การแคชข้อมูล และได้รับการเพิ่มประสิทธิภาพให้ทำงานกับโครงสร้างพื้นฐานแบบกระจายของเว็บ
ดูคำจำกัดความของเมธอดในเอกสารประกอบของมาตรฐาน HTTP 1.1 ซึ่งมีประโยชน์มาก มีข้อมูลจำเพาะสำหรับ GET
, POST
, PUT
และ DELETE
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-29 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-08-29 UTC"],[[["\u003cp\u003eREST is an architectural style for exchanging data using standard HTTP methods like \u003ccode\u003eGET\u003c/code\u003e, \u003ccode\u003ePOST\u003c/code\u003e, \u003ccode\u003ePUT\u003c/code\u003e, and \u003ccode\u003eDELETE\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eGoogle APIs implement REST, allowing clients to interact with Google's data by sending HTTP requests to specific resource URIs.\u003c/p\u003e\n"],["\u003cp\u003eRESTful systems rely on unique URIs for resources, enabling efficient caching and leveraging web infrastructure.\u003c/p\u003e\n"],["\u003cp\u003eClients request actions on data stored by the server, which then performs the action and responds, often with a representation of the resource.\u003c/p\u003e\n"]]],["REST is a software architecture style employing HTTP verbs to interact with data. Clients send requests to servers to perform actions like creating, retrieving, updating, or deleting resources. Resources are identified by unique URIs, structured as `https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters`. The server executes the requested action and responds. Common HTTP verbs used include `POST`, `GET`, `PUT`, and `DELETE`, defining the specific action. This structure supports data caching and is optimized for web infrastructure.\n"],null,[]]