Generate User Thumbnail

Generates and returns the URL for the user's avatar thumbnail.

This is a long-running operation: the response is an Operation object. Poll the operation using its returned path until done is true, at which point response.imageUri contains the thumbnail URL. See Get User Thumbnail Generation Operation.

get/cloud/v2/users/{user_id}:generateThumbnail#OpenCloudUsers

Path parameters

user_idstring required

The user ID.

Query parameters

sizeinteger

Size of the generated thumbnail. The generated thumbnail will have size * size dimension.

Currently supported values: 48, 50, 60, 75, 100, 110, 150, 180, 352, 420, 720 Default is 420.

format'FORMAT_UNSPECIFIED' | 'PNG' | 'JPEG'

Define the format of the thumbnail.

Specify the format of the generated thumbnail. Default is PNG.

Possible values:

ValueDescription
FORMAT_UNSPECIFIEDDefault UserThumbnail Format -- set to png
PNGGenerate thumbnail in .png format
JPEGGenerate thumbnail in .jpg format
shape'SHAPE_UNSPECIFIED' | 'ROUND' | 'SQUARE'

Define the shape of the thumbnail.

Specify the shape of the thumbnail. Default is ROUND (circular).

Possible values:

ValueDescription
SHAPE_UNSPECIFIEDDefault UserThumbnail Shape -- set to round
ROUNDGenerate thumbnail as a circle.
SQUAREGenerate thumbnail as a rectangle.

Response

Success

pathstring nullable

The server-assigned path, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the path should be a resource path ending with operations/{unique_id}.

metadataOpenCloudUsersGenerateUserThumbnailMetadata

Represents metadata about the long-running operation corresponding to a GenerateUserThumbnail request.

This is the type of the Operation.metadata field in the response to GetOperation requests for GenerateUserThumbnail operations.

doneboolean

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

Changes

Changed in 1 of the 15 revisions of this API.1