Osmose/api/0.3

From OpenStreetMap Wiki
Jump to navigation Jump to search

API 0.3 is available at: http://osmose.openstreetmap.fr/api/0.3/. Generally the API returns JSON.

Main API documentation point at http://osmose.openstreetmap.fr/api/docs

Settings

Details of parameters used by the query on API. All settings are not available for all queries.

Example : http://osmose.openstreetmap.fr/api/0.3/issues?item=1070&bbox=-74.3788,18.3852,-73.8377,18.6807

Param Type Default Comment
lat float Latitude.
lon float Longitude.
bbox lon1,lat1,lon2,lat2 Restriction area.
item 1000,1010,1020,2xxx All Returned items list, a number followed by "xxx" for complet category. See the list at http://osmose.openstreetmap.fr/fr/api/0.2/meta/items
source integer Number of the source, see the source list at http://osmose.openstreetmap.fr/fr/control/update
class integer Classes of item, one or many classes separated with commas, a class is a sub part of an item. Make sense only with a unique item.
username OSM username, returns issues for objects when user is the last editor.
level list of 1, 2 or 3 1,2,3 Level of issues. List of number 1, 2 and/or 3 in this order.
zoom integer 10 Zoom level
limit integer 100 Returned issues, 500 max.
country Issues for an area. The wildcard "*" is allowed as part of the parameter, eg "france*" for all regions at once. See the list at http://osmose.openstreetmap.fr/api/0.3/countries
useDevItem true, false or all false Returns issues only for items that are not active, not active are dev or buggy items.
status open, done, false open Issues status, "open", "done" for issues reported as corrected and "false" for issues repported as false positive.
start_date date Issues generated after this date. For statistics begins on this date. Date format "Y[-m[-d]]".
end_date date Issues generated before thit date. For statistics ended on this date. Date format "Y[-m[-d]]".
tags t1,t2,t3 Filter issues on that tags list via their items. Tags are topic of analysis, not OSM tags. The list of tags http://osmose.openstreetmap.fr/fr/api/0.2/meta/tags
fixables online or josm Returns issues with proposed correction usable with the Osmose online editor or with JOSM.

meta

This part of the API does not return issue data directly, but meta-data particularly around the different groupings and classifications of issues. The text snippets (which may be useful to display within a client application) can be returned in various languages. It supports the langs parameter which has the same semantics as http header accept-language. langs can also have the value "auto" to let the server use the http header accept-language directly.

URL Param Description
/countries List of supported regions Osmose.
/items langs List of available items with translations.
/items/<item:int>/class/<classs:int> langs Get only detail of one class of an item. Example: http://osmose.openstreetmap.fr/api/0.3/items/1/class/1?langs=auto
/tags List of tags to filter on.

Issues

The mainpart of the API, allows queries for issues.

URL Param Description
/issue/<id:int> langs Fetch issue data