Method: labels.get
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
리소스 이름으로 라벨을 가져옵니다. 자세한 내용은 라벨 검색을 참고하세요.
리소스 이름은 다음 중 하나일 수 있습니다.
labels/{id}
- labels/{id}@latest
참고
labels/{id}@latest
- 라벨의 최신 버전을 가져옵니다.
labels/{id}@published
- 라벨의 현재 게시된 버전을 가져옵니다.
labels/{id}@{revisionId}
- 지정된 버전 ID의 라벨을 가져옵니다.
HTTP 요청
GET https://drivelabels.googleapis.com/v2/{name=labels/*}
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
name |
string
필수입니다. 라벨 리소스 이름입니다. 다음 중 하나일 수 있습니다.
labels/{id} (labels/{id}@latest와 동일)
labels/{id}@latest
labels/{id}@published
labels/{id}@{revisionId}
|
쿼리 매개변수
매개변수 |
useAdminAccess |
boolean
사용자의 관리자 사용자 인증 정보를 사용하려면 true 로 설정합니다. 서버는 액세스를 허용하기 전에 사용자가 라벨의 관리자인지 확인합니다.
|
languageCode |
string
현지화된 필드 라벨을 평가하는 데 사용할 BCP-47 언어 코드입니다. 지정하지 않으면 기본 구성된 언어의 값이 사용됩니다.
|
view |
enum (LabelView )
지정하면 표시된 뷰에 속하는 특정 필드만 반환됩니다.
|
응답 본문
성공한 경우 응답 본문에 Label
의 인스턴스가 포함됩니다.
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.labels.readonly
https://www.googleapis.com/auth/drive.admin.labels
https://www.googleapis.com/auth/drive.admin.labels.readonly
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-05(UTC)
[null,null,["최종 업데이트: 2025-08-05(UTC)"],[],[],null,["# Method: labels.get\n\n- [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\nGet a label by its resource name. For more information, see [Search for labels](https://developers.google.com/workspace/drive/labels/guides/search-label).\n\nResource name may be any of:\n\n- `labels/{id}` - See `labels/{id}@latest`\n- `labels/{id}@latest` - Gets the latest revision of the label.\n- `labels/{id}@published` - Gets the current published revision of the label.\n- `labels/{id}@{revisionId}` - Gets the label at the specified revision ID.\n\n### HTTP request\n\n`GET https://drivelabels.googleapis.com/v2/{name=labels/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Label resource name. May be any of: - `labels/{id}` (equivalent to labels/{id}@latest) - `labels/{id}@latest` - `labels/{id}@published` - `labels/{id}@{revisionId}` |\n\n### Query parameters\n\n| Parameters ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `useAdminAccess` | `boolean` Set to `true` in order to use the user's admin credentials. The server verifies that the user is an admin for the label before allowing access. |\n| `languageCode` | `string` The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used. |\n| `view` | `enum (`[LabelView](/workspace/drive/labels/reference/rest/v2/LabelView)`)` When specified, only certain fields belonging to the indicated view are returned. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Label](/workspace/drive/labels/reference/rest/v2/labels#Label).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive.labels`\n- `\n https://www.googleapis.com/auth/drive.labels.readonly`\n- `\n https://www.googleapis.com/auth/drive.admin.labels`\n- `\n https://www.googleapis.com/auth/drive.admin.labels.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]