Method: presentations.pages.getThumbnail
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Genera una miniatura de la versión más reciente de la página especificada en la presentación y muestra una URL a la imagen de la miniatura.
Esta solicitud se considera una solicitud de lectura costosa a los efectos de la cuota.
Solicitud HTTP
GET https://slides.googleapis.com/v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail
La URL usa la sintaxis de la transcodificación gRPC.
Parámetros de ruta de acceso
Parámetros |
presentationId |
string
Es el ID de la presentación que se recuperará.
|
pageObjectId |
string
Es el ID del objeto de la página cuya miniatura se recuperará.
|
Parámetros de consulta
Parámetros |
thumbnailProperties |
object (ThumbnailProperties )
Las propiedades de la miniatura
|
Cuerpo de la solicitud
El cuerpo de la solicitud debe estar vacío.
Cuerpo de la respuesta
Es la miniatura de una página.
Si se ejecuta correctamente, el cuerpo de la respuesta contendrá datos con la siguiente estructura:
Representación JSON |
{
"width": integer,
"height": integer,
"contentUrl": string
} |
Campos |
width |
integer
Es el ancho positivo en píxeles de la imagen de la miniatura.
|
height |
integer
Es la altura positiva en píxeles de la imagen de miniatura.
|
contentUrl |
string
Es la URL del contenido de la imagen en miniatura. La URL de la imagen tiene una vida útil predeterminada de 30 minutos. Esta URL está etiquetada con la cuenta del solicitante. Cualquier persona que tenga la URL accede a la imagen como el solicitante original. Es posible que se pierda el acceso a la imagen si cambia la configuración de uso compartido de la presentación. El tipo de MIME de la imagen de miniatura es el mismo que se especifica en GetPageThumbnailRequest .
|
Permisos de autorización
Se necesita uno de los siguientes permisos de 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
Para obtener más información, consulta la Guía de autorización.
ThumbnailProperties
Proporciona control sobre la creación de miniaturas de páginas.
Campos |
mimeType |
enum (MimeType )
Es el tipo de MIME opcional de la imagen de miniatura. Si no especificas el tipo MIME, el valor predeterminado es PNG.
|
thumbnailSize |
enum (ThumbnailSize )
Es el tamaño opcional de la imagen en miniatura. Si no especificas el tamaño, el servidor elige un tamaño predeterminado para la imagen.
|
MimeType
Es el tipo de MIME de la imagen de miniatura.
Enumeraciones |
PNG |
Es el tipo MIME predeterminado. |
ThumbnailSize
Los tamaños de imagen en miniatura predefinidos.
Enumeraciones |
THUMBNAIL_SIZE_UNSPECIFIED |
Es el tamaño predeterminado de la imagen en miniatura. El tamaño de miniatura no especificado implica que el servidor elige el tamaño de la imagen de una manera que podría variar en el futuro. |
LARGE |
El ancho de la imagen miniatura es de 1,600 px. |
MEDIUM |
El ancho de la imagen de la miniatura debe ser de 800 px. |
SMALL |
El ancho de la imagen miniatura es de 200 px. |
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-03-25 (UTC)
[null,null,["Última actualización: 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. |"]]