設定權限和驗證
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
確認您的使用者帳戶具有專案的編輯者/擁有者權限
您可以執行下列指令來查看有效帳戶:
gcloud auth list
如果您的使用者帳戶不是有效帳戶,您可以使用下列指令變更有效帳戶:
gcloud config set account `ACCOUNT`
如果沒有有效帳戶,您必須先發出以下資訊:
gcloud auth login
取得 OAuth 2.0 存取權杖
您必須先取得與使用者帳戶相關聯的 OAuth 2.0 權杖,才能向地圖資料集服務發出要求。
export TOKEN=$(gcloud auth print-access-token)
您現在可以開始向 Maps Datasets API 發出要求
curl -H "X-Goog-User-Project: PROJECT_NUMBER" -H "Authorization: Bearer $TOKEN" https://mapsplatformdatasets.googleapis.com/v1alpha/projects/PROJECT_NUMBER/datasets/
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-05-02 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-05-02 (世界標準時間)。"],[[["Ensure your Google Cloud user account has Editor or Owner permissions for the project to access and manage Maps Datasets."],["Verify your active account using `gcloud auth list` and switch accounts if necessary with `gcloud config set account ACCOUNT`."],["Obtain an OAuth 2.0 access token using `gcloud auth print-access-token` to authenticate requests to the Maps Datasets API."],["Use the access token and project details in API requests to interact with the Maps Datasets service, such as listing datasets via `curl`."]]],[]]