The implementation of the API will eventually allow easy addition of other file formats other than JSON, such as XML, by use of the "Accept-Types" HTTP header.
Name | Method | URL | Description | Sample Response |
Info Get | GET | /api/info/<int:modelid> | Returns the model information for modelid as JSON. | JSON:(a) |
Model Get | GET | /api/model/<int:modelid> | Returns a zip with the model of the specified modelid. | zip file |
Tag Lookup | GET | /api/tag/<string:tag>/<int:pageid> | Returns model ids as JSON that have tag as one of their tags. pageid is optional, specifies the page. | JSON:[3,5] |
Category Lookup | GET | /api/category/<string:category>/<int:pageid> | Returns model ids as JSON that have category as one of their categories. pageid is optional, specifies the page. | JSON:[6,8] |
Author Lookup | GET | /api/author/<string:author>/<int:pageid> | Returns model ids as JSON that have author as their author. pageid is optional, specifies the page. | JSON:[3,20,432] |
Latitude and Longitude Search | GET | /api/search/<float:lat>/<float:lon>/<float:range>/<int:pageid> | Returns model ids as JSON within range meters of a point at lat latitude and lon longitude. range and pageid are optional (and range must be specified if pageid is.) | JSON:[2,15] |
Title Search | GET | /api/search/title/<string:text>/<int:pageid> | Returns model ids as JSON that have text in their title. pageid is optional. | JSON:[2,15] |
Text Search (b) | GET | /api/search/text/<string:text>/<int:pageid> | Returns model ids that are found with text using PostgreSQL Full Text Search in their title or description. pageid is optional. | JSON:[2,15] |
Full Search | GET | /api/search/full (c) | Permits combining various criteria to find the exact kinds of models we need. | JSON:[432] |
Note | Description |
a) |
|
(b) | Might not be implemented for GSoC. |
(c) | Sample Request Body:
Notes: If any parameter is not specified, it's ignored and won't be filtered from the results. The "title" attribute does what is described in the "Title Search" endpoint, and the "text" attribute what is described in the "Text Search" endpoint. |