קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Google APIs Explorer הוא כלי הזמין ברוב דפי התיעוד של שיטות ה-API ל-REST, המאפשרים לנסות שיטות Google API מבלי לכתוב קוד.
ה-APIs Explorer פועל על נתונים אמיתיים, לכן כדאי לפעול בזהירות כשמנסים להשתמש בשיטות שיוצרות נתונים, משנים או מוחקים אותם.
שימוש בספרייה
לקבלת רשימה של ממשקי ה-API של Google שכדאי להכיר, עיינו במדריך של Google APIs Explorer. הרשימה מכילה קישורים למסמכי עזר ל-API עבור ממשקי API נתמכים. כדי להתנסות ב-API:
בתיבת החיפוש שלמעלה, מזינים את שם ה-API שרוצים לבדוק.
לוחצים על שם ה-API. פעולה זו תפתח את מסמכי העזר של ה-API.
בצד ימין, לוחצים על השיטה שבה רוצים להשתמש בניווט.
בצד שמאל, מוצאים את החלונית עם התווית "כדאי לנסות את השיטה הזו." בהמשך מפורטים פרטים על אופן השימוש בחלונית הצדדית של ממשקי ה-API של Explorer ועל אופן ההרחבה שלה בחלונית של Explorer API במסך מלא.
שימוש בחלונית הצדדית
איור 1: החלונית הצדדית של ממשקי ה-API של Explorer עבור Google Books API.
כברירת מחדל, ה-APIs Explorer מופיע בצד שמאל של המסך בתיעוד של הפניות API עבור שיטות נתמכות.
אתם יכולים להתאים אישית את הקטעים הבאים ולהשתמש בהם בחלונית הצדדית של ממשקי ה-API:
מבקשים פרמטרים, אם הדבר נדרש בשיטה.
בקשה לגוף ההודעה, אם נדרש בשיטה.
פרטי כניסה כדי לבדוק את השיטה עם סוגים והיקפים שונים של פרטי כניסה.
הלחצן ביצוע כדי להפעיל את השיטה באמצעות הפרמטרים וההגדרות שצוינו.
תוצאה, מוצגת רק לאחר הפעלת השיטה.
שימוש בחלונית במסך מלא
איור 2: חלונית במסך מלא של APIs Explorer עבור Google Books API.
בחלונית הצדדית של ממשקי ה-API המכווצים, אפשר ללחוץ על 'מסך מלא'
fullscreen כדי להרחיב את API Explorer. בחלונית במסך מלא תופיע חלונית נוספת עם דוגמאות קוד, application/json תגובות ותגובות גולמיות של HTTP.
אימות
ה-APIs Explorer משתמש בפרטי הכניסה שלו כדי לשלוח בקשה. לא ניתן להשתמש בפרטי כניסה מותאמים אישית באמצעות ה-APIs Explorer.
פורמטים של נתונים
ה-APIs Explorer תומך רק ב-JSON לתשובות ולבקשות מטען ייעודי (payload). גם אם ה-API תומך בפורמטים אחרים של נתונים, הפורמטים האלה לא יפעלו ב-APIs Explorer.
[null,null,["עדכון אחרון: 2022-11-01 (שעון UTC)."],[[["\u003cp\u003eGoogle APIs Explorer allows you to experiment with Google API methods directly without coding, using real data.\u003c/p\u003e\n"],["\u003cp\u003eYou can find the desired API through the Google APIs Explorer Directory and navigate to its documentation to access the Explorer.\u003c/p\u003e\n"],["\u003cp\u003eThe Explorer provides an interface to input parameters, request bodies, and credentials for executing the API method and viewing results.\u003c/p\u003e\n"],["\u003cp\u003eWhile the Explorer uses its own credentials, it offers both side-panel and full-screen views with functionalities like code samples and response formats in JSON.\u003c/p\u003e\n"],["\u003cp\u003eRemember to exercise caution when using methods that modify data, as the Explorer operates on live data.\u003c/p\u003e\n"]]],[],null,["# Overview\n\nThe Google APIs Explorer is a tool available on most REST API method\ndocumentation pages that lets you try Google API methods without writing code.\nThe APIs Explorer acts on real data, so use caution when trying methods that\ncreate, modify, or delete data.\n\nUse the directory\n-----------------\n\nFor a list of Google APIs you can explore, browse the\n[Google APIs Explorer Directory](/apis-explorer). This list contains links to\nthe API reference documentation for supported APIs. Follow the steps below to\nexplore the API:\n\n1. Open the [Google APIs Explorer Directory](/apis-explorer).\n2. In the search box at the top, enter the name of the API you want to explore.\n3. Click the name of the API. This opens the API reference documentation.\n4. At the left, click the method you want to use in the navigation.\n5. At the right, find the panel labeled \"Try this method.\" See below for details\n about how to use the APIs Explorer side panel and how to expand it into the\n full-screen APIs Explorer panel.\n\n | **Note:** If you don't see the APIs Explorer side panel, the method might not be compatible with APIs Explorer.\n\nUse the side panel\n------------------\n\n**Figure 1**: APIs Explorer side panel for the Google Books API.\n\nBy default, the APIs Explorer appears on the right-hand side of the screen in\nAPI reference documentation for supported methods.\n\nYou can customize and interact with the following sections in the APIs Explorer\nside panel:\n\n- **Request parameters**, if required by the method.\n- **Request body**, if required by the method.\n- **Credentials**, to test the method with various credential types and scopes.\n- **Execute** button, to run the method using the parameters and settings you've specified.\n- **Result**, displayed only after executing the method.\n\nUse the full-screen panel\n-------------------------\n\n**Figure 2**: APIs Explorer full-screen panel for the Google Books API.\n\nIn the collapsed APIs Explorer side panel, you can click Full screen\nfullscreen to expand the APIs Explorer. The\nfull-screen panel displays an extra pane containing code samples,\n`application/json` responses, and Raw HTTP responses.\n\nAuthentication\n--------------\n\nThe APIs Explorer uses its own credentials to make a request. You can't use\ncustom credentials with the APIs Explorer.\n\nData formats\n------------\n\nThe APIs Explorer only supports JSON for responses and request payloads. Even if\nyour API supports other data formats, these formats don't work in the\nAPIs Explorer.\n\nNext steps\n----------\n\n- Learn how to [display the APIs Explorer and execute a method](/explorer-help/execute-method).\n- Learn how to [test a method using different credentials and scopes](/explorer-help/authorization-and-authentication).\n- Learn how to [execute APIs Explorer sample code locally](/explorer-help/code-samples)."]]