Returns the model information for the specified model id.
GET /api/info/<int:modelid>Sample (prettified) Response:
{
"id": 423,
"title": "Eiffel Tower",
"lat": 48.8583,
"lon": 2.2945,
"desc": "A model of the world famous Eiffel Tower",
"tags": {
"shape": "pyramidal",
"building": "yes",
"tourism": "attraction",
}
"author": "22633299",
"date": "2017-03-28",
"categories": ["monuments", "tall"]
]
}
Returns a glb model corresponding to the specified model id.
GET /api/model/<int:modelid>Sample Response: a gltf-binary file.
Returns model ids that have the specified tag as one of their tags.
GET /api/tag/<string:tag>Sample Response:
[3, 5]
Returns model ids that have the specified category as one of their categories.
GET /api/category/<string:tag>Sample Response:
[6, 8]
Returns model ids that have the specified author as one of their categories. Here uid refers to the OSM user id.
GET /api/author/<string:uid>Sample Response:
[6, 8]
Returns model ids that contain the specified string in their title.
GET /api/search/title/<string:title>Sample Response:
[2, 10, 17]
Returns model ids that have the specified category as one of their categories.
GET /api/search/<float:lat>/<float:lon>/<float:range>Sample Response:
[2, 10, 17]
Permits combining various criteria to find the exact kinds of models we need. Search query is sent in the request body. If any parameter is not specified, it's ignored and won't be filtered from the results.
Notes:
Live request body (try pressing Submit!):
Response:
(None yet)
Sample request body:
{
"lat": 48.8583,
"lon": 2.2945,
"range": 1000,
"title": "Eiffel",
"tags": {
"shape": "pyramidal",
"building": "yes"
},
"categories": [
"monuments",
"tall"
],
"page": 1,
"author": "22633299"
}
Sample Response:
[6, 8]
Sample request body with format attribute:
{
"lat": 48.8583,
"lon": 2.2945,
"range": 1000,
"format": ["id", "latitude", "longitude", "title"]
}
Sample Response:
[[1, 48.8583, 2.2945, "Eiffel Tower"], [64, 48.85831, 2.2945, "Near Eiffel Tower"]]