Reading Datasets
Stay organized with collections
Save and categorize content based on your preferences.
Get a Dataset
Send a request to get a dataset.
curl \
-H 'X-Goog-User-Project: PROJECT_NUMBER' \
-H "Authorization: Bearer $TOKEN" \
https://mapsplatformdatasets.googleapis.com/v1alpha/projects/PROJECT_NUMBER/datasets/DATASET_ID
Sample Request
curl \
-H 'X-Goog-User-Project: PROJECT_NUMBER' \
-H "Authorization: Bearer $TOKEN" \
https://mapsplatformdatasets.googleapis.com/v1alpha/projects/802317041956/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46
Sample Response
{
"name": "projects/802317041956/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46",
"displayName": "John Test Dataset",
"usage": [
"USAGE_DATA_DRIVEN_STYLING"
],
"createTime": "2022-08-15T17:50:00.189682Z",
"updateTime": "2022-08-15T17:50:00.189682Z"
}
List Datasets
Send a request to list all the datasets in the project.
curl \
-H 'X-Goog-User-Project: PROJECT_NUMBER' \
-H "Authorization: Bearer $TOKEN" \
https://mapsplatformdatasets.googleapis.com/v1alpha/projects/PROJECT_NUMBER/datasets
Sample Request
curl \
-H 'X-Goog-User-Project: PROJECT_NUMBER' \
-H "Authorization: Bearer $TOKEN" \
https://mapsplatformdatasets.googleapis.com/v1alpha/projects/802317041956/datasets
Sample Response
{
"datasets": [
{
"name": "projects/802317041956/datasets/f57074a0-a8b6-403e-9df1-e8a9e4f9fc46",
"displayName": "John Test Dataset",
"usage": [
"USAGE_DATA_DRIVEN_STYLING"
],
"createTime": "2022-08-15T17:50:00.189682Z",
"updateTime": "2022-08-15T17:50:00.189682Z"
},
{
"name": "projects/802317041956/datasets/2c8ae479-9670-4f5e-81d4-89c6435ca959",
"displayName": "Jane Test Dataset",
"usage": [
"USAGE_DATA_DRIVEN_STYLING"
],
"createTime": "2022-09-33T11:43:00.297945Z",
"updateTime": "2022-09-33T11:43:00.297945Z"
}
]
}
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 2023-03-09 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 2023-03-09 UTC."],[[["You can retrieve a specific dataset using its ID with a `curl` request that includes your project number and an authorization token."],["You can list all datasets associated with your project using a similar `curl` request, targeting the `/datasets` endpoint."],["Both requests require you to provide your project number and an authorization bearer token in the headers."],["The responses provide dataset details including name, display name, usage, creation time, and update time."]]],["To get a specific dataset, send a `curl` request to the provided URL, including project number and dataset ID. The response includes the dataset's name, display name, usage, creation time, and update time. To list all datasets in a project, send a similar `curl` request to a different URL, omitting the specific dataset ID. The response will include an array containing all the project datasets with related data.\n"]]