Method: mediaItems.patch
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-01 UTC."],[[["\u003cp\u003eThis document explains how to update the description of a media item you own that was created via the API using a \u003ccode\u003ePATCH\u003c/code\u003e request.\u003c/p\u003e\n"],["\u003cp\u003eThe request must specify the \u003ccode\u003emediaItem.id\u003c/code\u003e in the path and include an \u003ccode\u003eupdateMask\u003c/code\u003e query parameter set to \u003ccode\u003edescription\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a \u003ccode\u003eMediaItem\u003c/code\u003e object with the updated description, and a successful response will return the updated \u003ccode\u003eMediaItem\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/photoslibrary.edit.appcreateddata\u003c/code\u003e scope.\u003c/p\u003e\n"]]],[],null,["- [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- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdate the app created media item with the specified `id`. Only the `id` and `description` fields of the media item are read. The media item must have been created by the developer via the API.\n\nHTTP request\n\n`PATCH https://photoslibrary.googleapis.com/v1/mediaItems/{mediaItem.id}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `mediaItem.id` | `string` Identifier for the media item. This is a persistent identifier that can be used between sessions to identify this media item. |\n\nQuery parameters\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. Indicate what fields in the provided media item to update. The only valid value is `description`. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\nRequest body\n\nThe request body contains an instance of [MediaItem](/photos/library/reference/rest/v1/mediaItems#MediaItem).\n\nResponse body\n\nIf successful, the response body contains an instance of [MediaItem](/photos/library/reference/rest/v1/mediaItems#MediaItem).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata`"]]