AI-generated Key Takeaways
-
This document explains how to update the description of a media item you own that was created via the API using a
PATCHrequest. -
The request must specify the
mediaItem.idin the path and include anupdateMaskquery parameter set todescription. -
The request body should contain a
MediaItemobject with the updated description, and a successful response will return the updatedMediaItem. -
Authorization requires the
https://www.googleapis.com/auth/photoslibrary.edit.appcreateddatascope.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Update 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.
HTTP request
PATCH https://photoslibrary.googleapis.com/v1/mediaItems/{mediaItem.id}
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
mediaItem.id |
Identifier for the media item. This is a persistent identifier that can be used between sessions to identify this media item. |
Query parameters
| Parameters | |
|---|---|
updateMask |
Required. Indicate what fields in the provided media item to update. The only valid value is This is a comma-separated list of fully qualified names of fields. Example: |
Request body
The request body contains an instance of MediaItem.
Response body
If successful, the response body contains an instance of MediaItem.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata