Updating Dataset Metadata
Stay organized with collections
Save and categorize content based on your preferences.
Update the Dataset
Send a request to update the metadata of the dataset.
Update the name
curl -X PATCH -d '{
"display_name": "DISPLAY_NAME"
}' \
-H 'X-Goog-User-Project: PROJECT_NUMBER' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://mapsplatformdatasets.googleapis.com/v1alpha/projects/PROJECT_NUMBER/datasets/DATASET_ID
Sample Request
curl -X PATCH -d '{
"display_name": "My Updated Dataset"
}' \
-H 'X-Goog-User-Project: PROJECT_NUMBER' \
-H "Content-Type: application/json" \
-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": "My Updated Dataset",
"usage": [
"USAGE_DATA_DRIVEN_STYLING"
],
"createTime": "2022-08-15T17:50:00.189682Z",
"updateTime": "2023-01-27T21:20:19.847394Z"
}
Update the description
curl -X PATCH -d '{
"description": "DESCRIPTION"
}' \
-H 'X-Goog-User-Project: PROJECT_NUMBER' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://mapsplatformdatasets.googleapis.com/v1alpha/projects/PROJECT_NUMBER/datasets/DATASET_ID
Sample Request
curl -X PATCH -d '{
"description": "This is an updated description"
}' \
-H 'X-Goog-User-Project: PROJECT_NUMBER' \
-H "Content-Type: application/json" \
-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": "My Dataset",
"description": "This is an updated description",
"usage": [
"USAGE_DATA_DRIVEN_STYLING"
],
"createTime": "2022-08-15T17:50:00.189682Z",
"updateTime": "2023-01-27T21:20:19.847394Z"
}
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."],[[["This document explains how to update the metadata of a dataset, specifically the display name and description."],["To update the dataset, you need to send a PATCH request to the specified endpoint with the updated information in JSON format."],["The request requires authorization using a bearer token and specifying the project number."],["Sample requests and responses are provided to illustrate the process of updating the display name and description."],["The response includes details about the dataset, including its name, display name, description, usage, creation time, and update time."]]],["To update a dataset's metadata, send a PATCH request to the specified API endpoint. The request must include project number, dataset ID, content type, and an authorization token. To change the dataset name, modify the \"display_name\" field in the request body. To modify the dataset description, alter the \"description\" field instead. Successful updates return dataset details, including the modified name or description and updated timestamp.\n"]]