이 문서에서는 권한을 위해 Drive API를 사용하여 코드를 이전하는 방법을 설명합니다.
Looker Studio API에
추가할 수 있습니다 일반적인 Drive API 엔드포인트의 경우
해당하는 Looker Studio API 코드를 반환합니다.
파일
Drive API 파일 엔드포인트의 경우 Looker Studio API에는 동등한 엔드포인트만 있습니다.
Files: list 엔드포인트의 엔드포인트가 있어야 합니다.
목록
API
메서드
엔드포인트
드라이브
POST
/drive/v3/files
Looker Studio
GET
/v1/assets:search
비교:
Drive
constoAuthToken='123'// This should be replaced with a valid OAuth token.fetch(`https://www.googleapis.com/drive/v3/files`,{headers:{Authorization:`Bearer ${oAuthToken}`},method:"POST",})
Looker Studio
constoAuthToken='123'// This should be replaced with a valid OAuth token.fetch(`https://datastudio.googleapis.com/v1/assets:search?assetTypes={ASSET_TYPE}`,{headers:{Authorization:`Bearer ${oAuthToken}`}})
Drive와 Looker Studio 간에는 1:1 매칭이 없지만 엔드포인트는 있습니다.
유사한 목표를 달성할 수 있습니다 주요 차이점은 Drive 파일에는 여러
Looker Studio에는 정확히 1개가 있습니다.
API
메서드
엔드포인트
드라이브
GET
/drive/v3/files/fileId/permissions
Looker Studio
GET
/v1/assets/assetId/permissions
비교:
Drive
다음 코드는 Drive API의 모든 권한 객체를 나열합니다.
코드에 따라 페이지로 나누기를 사용하여 이 메서드를 여러 번 호출할 수 있습니다.
토큰 (표시된 대로)을
할 수 있습니다.
constfileId='123';// This should be replaced with a valid Drive ID.constoAuthToken='123';// This should be replaced with a valid OAuth token.letnextPageToken=undefined;letpermissions=[];do{constpermissionsData=awaitfetch(`https://www.googleapis.com/drive/v3/files/${fileId}/permissions`,{headers:{Authorization:`Bearer ${oAuthToken}`}});nextPageToken=permissionsData.nextPageToken;permissions=permissions.concat(permissionsData.permissions)}while(nextPageToken!==undefined);
Looker Studio
Looker Studio 애셋에는 권한 객체가 하나만 있으므로
페이지로 나누기를 고려해야 합니다.
constoAuthToken='123'// This should be replaced with a valid OAuth token.constassetId='123'// This should be replaced with a valid asset ID.fetch(`https://datastudio.googleapis.com/v1/assets/{ASSET_ID}/permissions`,{headers:{Authorization:`Bearer ${oAuthToken}`}}
권한을 업데이트하는 경우 Looker Studio와 Drive API는
기능을 제공합니다 가장 큰 차이점은 expirationTime를 설정할 수 없다는 것입니다.
Looker Studio 권한이 필요합니다.
API
메서드
엔드포인트
드라이브
PATCH
/drive/v3/files/fileId/permissions/permissionId
Looker Studio
PATCH
/v1/assets/assetId/permissions
비교:
Drive
constfileId='123';// This should be replaced with a valid Drive ID.constoAuthToken='123';// This should be replaced with a valid OAuth token.constnewPermissionsObject={expirationTime:'...',role:'owner',// Or any other option}fetch(`https://www.googleapis.com/drive/v3/files/${fileId}/permissions/permissionId`,{headers:{Authorization:`Bearer ${oAuthToken}`},method:"PATCH",body:JSON.stringify(newPermissionsObject)})
Looker Studio
constoAuthToken='123'// This should be replaced with a valid OAuth token.constassetId='123'// This should be replaced with a valid asset ID.constnewPermissionsObject={permissions:{//...}}fetch(`https://datastudio.googleapis.com/v1/assets/${assetId}/permissions`,{headers:{Authorization:`Bearer ${oAuthToken}`},method:"PATCH",body:JSON.stringify({name:assetId,permissions:newPermissionsObject})})
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eThis guide explains how to migrate code using the Drive API for permission management to the Looker Studio API, providing equivalent Looker Studio API code snippets for common Drive API endpoints.\u003c/p\u003e\n"],["\u003cp\u003eThe Looker Studio API has limited file management functionality compared to the Drive API, with only an equivalent endpoint for listing files (\u003ccode\u003eFiles: list\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eWhile the Drive API allows managing multiple permission objects per file, Looker Studio assets have a single, always-existing permission object, leading to different endpoint usage for permission control.\u003c/p\u003e\n"],["\u003cp\u003eDespite differences in managing permissions, both APIs offer similar functionalities for updating permissions, with the exception of setting expiration times on Looker Studio permissions.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should use appropriate HTTP libraries for their chosen language when making calls to the Looker Studio API, as there are no dedicated client libraries available.\u003c/p\u003e\n"]]],[],null,["# Migrating from the Drive API\n\nThis document outlines how to migrate code using the Drive API for permission\nmanagement to the Looker Studio API. For common Drive API endpoints, it shows\nthe corresponding Looker Studio API code.\n| **Note:** There are no client libraries for using the Looker Studio API. To make these calls, use an appropriate HTTP library for your language.\n\nFiles\n-----\n\nFor the Drive API files endpoints, the Looker Studio API only has an equivalent\nendpoint for the `Files: list` endpoint.\n\n### List\n\n| API | Method | Endpoint |\n|---------------|--------|---------------------|\n| Drive | `POST` | `/drive/v3/files` |\n| Looker Studio | `GET` | `/v1/assets:search` |\n\nComparison:\n\n**Drive** \n\n const oAuthToken = '123' // This should be replaced with a valid OAuth token.\n fetch(`https://www.googleapis.com/drive/v3/files`, {\n headers: {\n Authorization: `Bearer ${oAuthToken}`\n },\n method: \"POST\",\n })\n\n**Looker Studio** \n\n const oAuthToken = '123' // This should be replaced with a valid OAuth token.\n fetch(`https://datastudio.googleapis.com/v1/assets:search?assetTypes={ASSET_TYPE}`, {\n headers: {\n Authorization: `Bearer ${oAuthToken}`\n }\n })\n\nSee [search assets](/looker-studio/integrate/api/reference/assets/search).\n\nPermissions\n-----------\n\n### Create, Delete, And Get\n\n| API | Method | Endpoint |\n|-------|----------|---------------------------------------------------|\n| Drive | `POST` | `/drive/v3/files/fileId/permissions` |\n| Drive | `DELETE` | `/drive/v3/files/fileId/permissions/permissionId` |\n| Drive | `GET` | `/drive/v3/files/fileId/permissions/permissionId` |\n\nThere are no corresponding endpoints in the Looker Studio API for managing\nmultiple `Permissions` objects. There is only one permissions object for a\nLooker Studio asset, and it always exists.\n\n- To remove someone from an asset, see [revoke all permissions](/looker-studio/integrate/api/reference/permissions/revokeAllPermissions)\n- To add someone to an asset, see [add members](/looker-studio/integrate/api/reference/permissions/addMembers)\n- To view a permissions object for an asset, see [get permissions](/looker-studio/integrate/api/reference/permissions/get)\n\n### List\n\nThere isn't a 1-to-1 match between Drive and Looker Studio, but the endpoints\nserve similar goals. The main difference is that a Drive file can have many\npermissions objects, and Looker Studio has exactly one.\n\n| API | Method | Endpoint |\n|---------------|--------|--------------------------------------|\n| Drive | `GET` | `/drive/v3/files/fileId/permissions` |\n| Looker Studio | `GET` | `/v1/assets/assetId/permissions` |\n\nComparison:\n\n**Drive**\n\nThis following code lists all the permissions objects for the Drive API.\nDepending on your code, you may call this method multiple times using pagination\ntokens (as shown) to ensure you can see all of the permissions that are set for\na file. \n\n const fileId = '123'; // This should be replaced with a valid Drive ID.\n const oAuthToken = '123'; // This should be replaced with a valid OAuth token.\n let nextPageToken = undefined;\n let permissions = [];\n do {\n const permissionsData = await fetch(`https://www.googleapis.com/drive/v3/files/${fileId}/permissions`, {\n headers: {\n Authorization: `Bearer ${oAuthToken}`\n }\n });\n nextPageToken = permissionsData.nextPageToken;\n permissions = permissions.concat(permissionsData.permissions)\n } while (nextPageToken !== undefined);\n\n**Looker Studio**\n\nSince there is only one permission object for a Looker Studio asset, you don't\nhave to account for pagination. \n\n const oAuthToken = '123' // This should be replaced with a valid OAuth token.\n const assetId = '123' // This should be replaced with a valid asset ID.\n fetch(`https://datastudio.googleapis.com/v1/assets/{ASSET_ID}/permissions`, {\n headers: {\n Authorization: `Bearer ${oAuthToken}`\n }\n }\n\nSee [get permissions](/looker-studio/integrate/api/reference/permissions/get).\n\nUpdate\n------\n\nFor updating permissions, the Looker Studio and Drive APIs have very similar\nfunctionality. The main difference is you cannot set an `expirationTime` on a\nLooker Studio permission.\n\n| API | Method | Endpoint |\n|---------------|---------|---------------------------------------------------|\n| Drive | `PATCH` | `/drive/v3/files/fileId/permissions/permissionId` |\n| Looker Studio | `PATCH` | `/v1/assets/assetId/permissions` |\n\nComparison:\n\n**Drive** \n\n const fileId = '123'; // This should be replaced with a valid Drive ID.\n const oAuthToken = '123'; // This should be replaced with a valid OAuth token.\n const newPermissionsObject = {\n expirationTime: '...',\n role: 'owner', // Or any other option\n }\n fetch(`https://www.googleapis.com/drive/v3/files/${fileId}/permissions/permissionId`, {\n headers: {\n Authorization: `Bearer ${oAuthToken}`\n },\n method: \"PATCH\",\n body: JSON.stringify(newPermissionsObject)\n })\n\n**Looker Studio** \n\n const oAuthToken = '123' // This should be replaced with a valid OAuth token.\n const assetId = '123' // This should be replaced with a valid asset ID.\n const newPermissionsObject = {\n permissions: {\n //...\n }\n }\n\n fetch(`https://datastudio.googleapis.com/v1/assets/${assetId}/permissions`, {\n headers: {\n Authorization: `Bearer ${oAuthToken}`\n },\n method: \"PATCH\",\n body: JSON.stringify({\n name: assetId,\n permissions: newPermissionsObject\n })\n })\n\nFor use-case specific alternatives, see:\n\n- [add members](/looker-studio/integrate/api/reference/permissions/addMembers)\n- [revoke all permissions](/looker-studio/integrate/api/reference/permissions/revokeAllPermissions)"]]