미디어 항목 관리
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
미디어 항목을 업로드한 후 미디어 항목의 액세스 및 검색 외에 항목 설명도 변경할 수 있습니다.
필수 승인 범위
앱에서 생성된 콘텐츠의 설명을 변경하려면 photoslibrary.edit.appcreateddata
범위가 필요합니다. 범위에 대한 자세한 내용은 승인 범위를 참조하세요.
미디어 항목의 설명을 변경하려면 미디어 항목의 식별자로 media items update
call
를 만들고 요청에 새 설명을 포함합니다.
미디어 항목의 설명을 변경하려면 앱에서 미디어 항목을 업로드해야 하며 현재 인증된 사용자가 소유자여야 합니다. 설명은 1,000자(영문 기준) 이하여야 합니다.
REST
다음은 미디어 항목 설명을 업데이트하는 PATCH 요청 헤더입니다.
PATCH https://photoslibrary.googleapis.com/v1/mediaItems/media-item-id?updateMask=description
이 요청은 URL의 updateMask
매개변수로 표시된 필드 마스크를 포함하여 업데이트되는 속성을 결정합니다.
요청 본문에 새 설명을 포함합니다.
{
"description": "new-media-item-description"
}
성공하면 응답은 업데이트된 미디어 항목을 반환합니다.
{
"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"
}
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[[["\u003cp\u003eAfter uploading media items to Google Photos, you can change their descriptions using the Google Photos API.\u003c/p\u003e\n"],["\u003cp\u003eModifying descriptions of app-created content requires the \u003ccode\u003ephotoslibrary.edit.appcreateddata\u003c/code\u003e scope and ownership by the authenticated user.\u003c/p\u003e\n"],["\u003cp\u003eTo update a description, use the \u003ccode\u003emediaItems/patch\u003c/code\u003e endpoint with the item's ID and a request body containing the new description.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eupdateMask\u003c/code\u003e parameter in the request URL specifies that only the description is being modified.\u003c/p\u003e\n"],["\u003cp\u003eThe response to a successful update request will return the complete updated media item object.\u003c/p\u003e\n"]]],["To modify a media item's description, use a `media items update call` with a PATCH request, specifying the item's ID and the `updateMask` parameter. Include the new description in the request body, ensuring it's under 1,000 characters. This requires the `photoslibrary.edit.appcreateddata` scope, with the app having uploaded the media, and the authenticated user must be the owner. A successful request returns the updated media item details, including the new description.\n"],null,["# Manage media items\n\nIn addition to [accessing and\nretrieving](/photos/library/guides/access-media-items) media items after you\n[upload](/photos/library/guides/upload-media) them, you can also change their\ndescriptions.\n\nRequired authorization scope\n----------------------------\n\nChanging descriptions of app-created content requires the\n`photoslibrary.edit.appcreateddata` scope. For more information on scopes, see\n[Authorization scopes](/photos/overview/authorization).\n\nChanging media item descriptions\n--------------------------------\n\nTo change a media item's description, make a [`media items update\ncall`](/photos/library/reference/rest/v1/mediaItems/patch) with the identifier\nof the media item, and include the new description in the request.\n\nTo change a media item's description, your app must have uploaded the media\nitem, and the currently authenticated user must be the owner. Descriptions can\nbe no more than 1,000 characters in length. \n\n### REST\n\nHere's a PATCH request header to update a media item description: \n\n```\nPATCH https://photoslibrary.googleapis.com/v1/mediaItems/media-item-id?updateMask=description\n```\n\nThis request determines what properties are being updated by including a\nfield mask, indicated by the `updateMask` parameter in the URL.\n\nInclude the new description in the body of the request: \n\n```restructuredtext\n{\n \"description\": \"new-media-item-description\"\n}\n```\n\nIf successful, the response returns the updated media item: \n\n```restructuredtext\n{\n \"id\": \"media-item-id\",\n \"description\": \"\u003cvar translate=\"no\"\u003enew-media-item-description\u003c/var\u003e\",\n \"productUrl\": \"media-item-product-url\",\n \"baseUrl\": \"media-items-in-album\",\n \"mimeType\": \"mime-type-of-media\",\n \"mediaMetadata\": {\n ...\n },\n \"contributorInfo\": {\n ...\n },\n \"fileName\": \"\u003cvar translate=\"no\"\u003eitem-filename\u003c/var\u003e\"\n}\n```"]]