מידע על ממשקי RESTful API
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
REST הוא סגנון של ארכיטקטורת תוכנה שמציע תפיסה נוחה ועקבית לבקשת נתונים ולשינוי שלהם.
המונח REST הוא קיצור של Representational State Transfer. בהקשר של Google APIs, REST מתייחס לשימוש בפעלים של 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
.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון 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-07-25 (שעון UTC)."],[[["REST, or Representational State Transfer, is an architectural style for exchanging data using standard HTTP methods."],["Google APIs utilize REST to allow clients to interact with Google's data by sending requests using verbs like `GET`, `POST`, `PUT`, and `DELETE`."],["Each Google API resource is uniquely identified by a URI allowing efficient caching and interaction within the web's infrastructure."]]],["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"]]