تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتيح لك واجهة برمجة التطبيقات Google Slides API إنشاء ملفات عروض تقديمية وإدارة الملفات الحالية.
تعرض الأمثلة الواردة في هذه الصفحة بعض عمليات عرض الصفحات الشائعة باستخدام طريقة
presentations.batchUpdate.
يتم تقديم هذه الأمثلة كطلبات HTTP لتكون محايدة لغويًا. للتعرّف على كيفية تنفيذ تعديل مجمّع بلغات مختلفة باستخدام مكتبات برامج Google API، راجِع الأدلة التالية:
يمكن أيضًا إنشاء ملفات عروض تقديمية فارغة باستخدام طريقة files.create في Google Drive API من خلال تحديد application/vnd.google-apps.presentation كـ نوع MIME.
في ما يلي بروتوكول الطلب لإنشاء عرض تقديمي:
POST https://slides.googleapis.com/v1/presentations
{
"title": "My New Presentation"
}
عرض قائمة بملفات العروض التقديمية الحالية
لا توفّر Slides API طريقة لاسترداد قائمة بالعروض التقديمية، ولكن توفّرها Drive API. تستخدِم طريقة
files.list (الموضّحة أدناه) أقنعة الحقول
لعرض قائمة بملفات العروض التقديمية من Drive، مع
رقم تعريف الملف واسم الملف ورابط لفتح الملف. يحدّد الطلب أيضًا application/vnd.google-apps.presentation كـ
نوع MIME.
في ما يلي بروتوكول الطلب لإدراج ملفات العروض التقديمية الحالية:
GET https://www.googleapis.com/drive/v3/files?q="mimeType=application/vnd.google-apps.presentation"&fields=files(id,name,webViewLink)
يتم استبدال كل مثيل للسلسلة "Gizmo Corp." بالنص "Gadget
Inc." ويشمل ذلك النص في مربعات النص والأشكال الأخرى وعلى الشرائح وداخل الشرائح الرئيسية. في هذه الحالة، يكون استبدال النص حسّاسًا لحالة الأحرف من خلال ضبط
matchCase
على true.
في ما يلي بروتوكول الطلب لاستبدال النص في جميع أنحاء العرض التقديمي:
POST https://slides.googleapis.com/v1/presentations/PRESENTATION_ID:batchUpdate
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Presentation operations\n\nThe Google Slides API lets you create presentation files and manage existing ones.\nThe examples on this page show some common page presentation operations using\nthe\n[`presentations.batchUpdate`](/workspace/slides/api/reference/rest/v1/presentations/batchUpdate)\nmethod.\n\nThese examples are presented as HTTP requests to be language neutral. To learn\nhow to implement a batch update in different languages using the Google API\nclient libraries, see the following guides:\n\n- [Create and manage presentations](/workspace/slides/api/guides/presentations#create_a_blank_presentation)\n- [Search for files and folders](/workspace/drive/api/guides/search-files#specific)\n- [Merge data into a presentation](/workspace/slides/api/guides/merge#example)\n\nCreate a presentation\n---------------------\n\nThe following\n[`presentations.create`](/workspace/slides/api/reference/rest/v1/presentations/create)\ncode sample shows how to creates a blank presentation file entitled \"My New\nPresentation\".\n\nIt's also possible to create blank presentation files using the Google Drive API\n[`files.create`](/workspace/drive/api/reference/rest/v3/files/create) method by\nspecifying `application/vnd.google-apps.presentation` as the\n[MIME type](/workspace/drive/api/guides/mime-types).\n\nThe following is the request protocol to create a presentation: \n\n```\nPOST https://slides.googleapis.com/v1/presentations\n``` \n\n```text\n{\n \"title\": \"My New Presentation\"\n}\n```\n\nList existing presentation files\n--------------------------------\n\nThe Slides API doesn't provide a method for retrieving a list of\npresentations but the\n[Drive API](/workspace/drive/api/guides/about-sdk) does. The\n[`files.list`](/workspace/drive/api/reference/rest/v3/files/list) method\n(presented below) uses [field masks](/workspace/slides/api/guides/field-masks)\nto return a list of presentation files from your Drive, with the\nfile ID, filename, and a link for opening the file. The request also specifies\n`application/vnd.google-apps.presentation` as the\n[MIME type](/workspace/drive/api/guides/mime-types).\n\nThe following is the request protocol to list existing presentation files: \n\n```\nGET https://www.googleapis.com/drive/v3/files?q=\"mimeType=application/vnd.google-apps.presentation\"&fields=files(id,name,webViewLink)\n```\n\nThe [response](/workspace/drive/api/reference/rest/v3/files/list#response-body)\nto this request has the following structure: \n\n```text\n{\n \"files\": [\n {\n \"id\": \"abcdefghijklmnopqrstuvwxyz0123456789\",\n \"name\": \"Project Vision\",\n \"webViewLink\": \"https://docs.google.com/a/google.com/presentation/d/abcdefghijklmnopqrstuvwxyz0123456789/edit?usp=drivesdk\"\n },\n {\n \"id\": \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\",\n \"name\": \"Untitled Presentation\",\n \"webViewLink\": \"https://docs.google.com/a/google.com/presentation/d/ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/edit?usp=drivesdk\"\n },\n ...\n ]\n}\n```\n\nReplace text throughout a presentation\n--------------------------------------\n\nThe following\n[`presentations.batchUpdate`](/workspace/slides/api/reference/rest/v1/presentations/batchUpdate)\ncode sample shows how to use the\n[`ReplaceAllTextRequest`](/workspace/slides/api/reference/rest/v1/presentations/request#ReplaceAllTextRequest)\nmethod to replace text throughout the presentation specified by the\n\u003cvar translate=\"no\"\u003ePRESENTATION_ID\u003c/var\u003e. You can discover the value for the\n[presentation ID](/workspace/slides/api/guides/overview#the_structure_of_a_presentation)\nfrom the presentation URL.\n\nEvery instance of the string \"Gizmo Corp.\" is replaced with the text \"Gadget\nInc.\" This includes text in text boxes and other shapes, on slides, and within\nmasters. In this instance, the text replacement is case-sensitive by setting\n[`matchCase`](/workspace/slides/api/reference/rest/v1/presentations/request#SubstringMatchCriteria)\nto `true`.\n\nThe following is the request protocol to replace text throughout a presentation: \n\n```\nPOST https://slides.googleapis.com/v1/presentations/PRESENTATION_ID:batchUpdate\n``` \n\n```text\n{\n \"requests\": [\n {\n \"replaceAllText\": {\n \"containsText\": {\n \"text\": \"Gizmo Corp.\",\n \"matchCase\": true\n },\n \"replaceText\": \"Gadget Inc.\"\n }\n }\n ]\n}\n```"]]