Create a map record from JSON, including the map configuration and list of associated datasets.
Methods
POST https://data-api.foursquare.com/v1/maps/ HTTP/1.1
Body
The body of the request should be the JSON data for the map record you want to create. All properties are optional, and unknown properties or those which cannot be updated will be ignored. In order to refer to datasets in the map state, they must be included in the datasets
list, which can be either a list of dataset UUIDs or a list of objects in the form {"id": "string"}
.
The map state is fully documented in the Studio Map Configurationformat specification.
Response
Updated map record
{
"id": "string",
"name": "string",
"createdAt": "2020-11-03T21:27:14.000Z",
"updatedAt": "2020-11-13T01:44:07.000Z",
"description": "string",
"privacy": "private",
"permission": "editor",
"latestState": {
"id": "string",
"data": MapConfig
},
"datasets": [
{
"id": "string",
"name": "string",
"createdAt": "2020-11-10T18:09:39.000Z",
"updatedAt": "2020-11-10T18:09:39.000Z",
"privacy": "private",
"permission": "editor",
"isValid": true
}
]
}
Example
curl -X POST https://data-api.foursquare.com/v1/maps/ \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
--data-binary '@/path/to/my_map.json'