Method: presentations.pages.getThumbnail
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
プレゼンテーション内の指定したページの最新バージョンのサムネイルを生成して、サムネイル画像の URL を返します。
このリクエストは、割り当ての計算上、高負荷の読み取りリクエストとしてカウントされます。
HTTP リクエスト
GET https://slides.googleapis.com/v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
presentationId |
string
取得するプレゼンテーションの ID。
|
pageObjectId |
string
サムネイルを取得するページのオブジェクト ID。
|
クエリ パラメータ
パラメータ |
thumbnailProperties |
object (ThumbnailProperties )
サムネイルのプロパティ。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
ページのサムネイル。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"width": integer,
"height": integer,
"contentUrl": string
} |
フィールド |
width |
integer
サムネイル画像の幅(ピクセル単位)。正の値にする必要があります。
|
height |
integer
サムネイル画像の高さ(ピクセル単位)。正の値にする必要があります。
|
contentUrl |
string
サムネイル画像のコンテンツ URL。 画像の URL のデフォルトの有効期間は 30 分です。この URL には、リクエスト元のアカウントのタグが付けられます。URL を知っているユーザーは誰でも、元のリクエスト元として画像にアクセスできます。プレゼンテーションの共有設定が変更されると、画像にアクセスできなくなる可能性があります。サムネイル画像の MIME タイプは、GetPageThumbnailRequest で指定したものと同じです。
|
認可スコープ
以下のいずれかの OAuth スコープが必要です。
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/presentations
https://www.googleapis.com/auth/presentations.readonly
詳しくは、認可ガイドをご覧ください。
ThumbnailProperties
フィールド |
mimeType |
enum (MimeType )
サムネイル画像の MIME タイプ(省略可)。 MIME タイプを指定しない場合、MIME タイプはデフォルトで PNG になります。
|
thumbnailSize |
enum (ThumbnailSize )
サムネイル画像のサイズ(省略可)。 サイズを指定しないと、サーバーは画像のデフォルト サイズを選択します。
|
ThumbnailSize
列挙型 |
THUMBNAIL_SIZE_UNSPECIFIED |
デフォルトのサムネイル画像サイズ。 サムネイルのサイズが指定されていない場合、サーバーは画像のサイズを選択しますが、その方法は将来変更される可能性があります。 |
LARGE |
サムネイル画像の幅は 1,600 ピクセルです。 |
MEDIUM |
サムネイル画像の幅は 800 ピクセルです。 |
SMALL |
サムネイル画像の幅は 200 ピクセルです。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-03-25 UTC。
[null,null,["最終更新日 2025-03-25 UTC。"],[],[],null,["# Method: presentations.pages.getThumbnail\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.Thumbnail.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [ThumbnailProperties](#ThumbnailProperties)\n - [JSON representation](#ThumbnailProperties.SCHEMA_REPRESENTATION)\n- [MimeType](#MimeType)\n- [ThumbnailSize](#ThumbnailSize)\n- [Try it!](#try-it)\n\nGenerates a thumbnail of the latest version of the specified page in the presentation and returns a URL to the thumbnail image.\n\nThis request counts as an [expensive read request](https://developers.google.com/workspace/slides/limits) for quota purposes.\n\n### HTTP request\n\n`GET https://slides.googleapis.com/v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------|\n| `presentationId` | `string` The ID of the presentation to retrieve. |\n| `pageObjectId` | `string` The object ID of the page whose thumbnail to retrieve. |\n\n### Query parameters\n\n| Parameters ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `thumbnailProperties` | `object (`[ThumbnailProperties](/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#ThumbnailProperties)`)` The thumbnail properties. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe thumbnail of a page.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------|\n| ``` { \"width\": integer, \"height\": integer, \"contentUrl\": string } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `width` | `integer` The positive width in pixels of the thumbnail image. |\n| `height` | `integer` The positive height in pixels of the thumbnail image. |\n| `contentUrl` | `string` The content URL of the thumbnail image. The URL to the image has a default lifetime of 30 minutes. This URL is tagged with the account of the requester. Anyone with the URL effectively accesses the image as the original requester. Access to the image may be lost if the presentation's sharing settings change. The mime type of the thumbnail image is the same as specified in the `GetPageThumbnailRequest`. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `https://www.googleapis.com/auth/drive.file`\n- `https://www.googleapis.com/auth/drive.readonly`\n- `https://www.googleapis.com/auth/presentations`\n- `https://www.googleapis.com/auth/presentations.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nThumbnailProperties\n-------------------\n\nProvides control over page thumbnail creation.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"mimeType\": enum (/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#MimeType), \"thumbnailSize\": enum (/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#ThumbnailSize) } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `mimeType` | `enum (`[MimeType](/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#MimeType)`)` The optional mime type of the thumbnail image. If you don't specify the mime type, the mime type defaults to PNG. |\n| `thumbnailSize` | `enum (`[ThumbnailSize](/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail#ThumbnailSize)`)` The optional thumbnail image size. If you don't specify the size, the server chooses a default size of the image. |\n\nMimeType\n--------\n\nThe mime type of the thumbnail image.\n\n| Enums ||\n|-------|------------------------|\n| `PNG` | The default mime type. |\n\nThumbnailSize\n-------------\n\nThe predefined thumbnail image sizes.\n\n| Enums ||\n|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `THUMBNAIL_SIZE_UNSPECIFIED` | The default thumbnail image size. The unspecified thumbnail size implies that the server chooses the size of the image in a way that might vary in the future. |\n| `LARGE` | The thumbnail image width of 1600px. |\n| `MEDIUM` | The thumbnail image width of 800px. |\n| `SMALL` | The thumbnail image width of 200px. |"]]