Learn about the new Picker API and important Library API changes.
Details here.
Manage media items
Stay organized with collections
Save and categorize content based on your preferences.
In addition to accessing and
retrieving media items after you
upload them, you can also change their
descriptions.
Required authorization scope
Changing descriptions of app-created content requires the
photoslibrary.edit.appcreateddata
scope. For more information on scopes, see
Authorization scopes.
To change a media item's description, make a media items update
call
with the identifier
of the media item, and include the new description in the request.
To change a media item's description, your app must have uploaded the media
item, and the currently authenticated user must be the owner. Descriptions can
be no more than 1,000 characters in length.
REST
Here's a PATCH request header to update a media item description:
PATCH https://photoslibrary.googleapis.com/v1/mediaItems/media-item-id?updateMask=description
This request determines what properties are being updated by including a
field mask, indicated by the updateMask
parameter in the URL.
Include the new description in the body of the request:
{
"description": "new-media-item-description"
}
If successful, the response returns the updated media item:
{
"id": "media-item-id",
"description": "new-media-item-description",
"productUrl": "media-item-product-url",
"baseUrl": "media-items-in-album",
"mimeType": "mime-type-of-media",
"mediaMetadata": {
...
},
"contributorInfo": {
...
},
"fileName": "item-filename"
}
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 2024-09-12 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-09-12 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 2024-09-12 UTC."]]