Osmose/api/0.2

From OpenStreetMap Wiki
Jump to navigation Jump to search


API 0.2 is now deprecated, please use API 0.3.

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

Settings

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

Example : http://osmose.openstreetmap.fr/fr/api/0.2/errors?full=true&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 errors on the objects when user is the last editor.
level list of 1, 2 or 3 1,2,3 Level errors. List of number 1, 2 and/or 3 in this order.
full false ou true false Errors details
zoom integer 10 Zoom level
limit integer 100 Returned errors, 500 max.
country Error for region. The wildcard "*" is allowed as part of the parameter, eg "france*" for all regions at once. See the list at http://osmose.openstreetmap.fr/fr/api/0.2/meta/countries
useDevItem true, false or all false Returns errors only for items that are not active, not active are dev or buggy items.
status open, done, false open Error status, "open", "done" for error reported as corrected and "false" for error repported as false positive.
start_date date Errors generated after this date. For statistics begins on this date. Date format "Y[-m[-d]]".
end_date date Errors generated before thit date. For statistics ended on this date. Date format "Y[-m[-d]]".
tags t1,t2,t3 Filter errors 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 errors with proposed correction usable with the Osmose online editor or with JOSM.

meta

This part of the API does not talk about errors, but about the classification, it does not support parameters.

URL Param Description
/meta/categories List of categories item with details of the items: name, level and errors number.
/meta/countries List of supported regions Osmose.
/meta/items List of available with translations.
/meta/tags List of tags to filter errors via their item.

error

The mainpart of the API, allows queries for errors.

URL Param Description
/error/ID Error details. ID is an integer.
/error/ID/done /error/ID/false Change the status of the error. Corrected as done or false positive as false. ID is an integer.
/error/ID/fix Gets the first possible correction. ID is an integer.
/error/ID/fix/IDF Gets a possible correction. ID and IDF are integers. IDF is the index of the proportion and starts at 0.
/errors lat, lon, bbox, item, source, class, username, level, full, limit, country, useDevItem, status, tags, fixable Errors list, depends on parameters.

user

Error by user, only the last contributor to the fault object is reported, even if it is not the cause of the error.

URL Param Description
/api/0.2/user/USERNAME bbox, item, source, class, level, limit, country, useDevItem, status, tags, fixable Liste des erreurs de l'utilisateur suivant les paramètres. USERNAME est un nom d'utilisateur OSM.

Errors list of user, depends on parameters. USERNAME is on OSM username.

/api/0.2/user_count/USERNAME bbox, item, source, class, level, limit, country, useDevItem, status, tags, fixable Errors count for a user depends on parameters.
/api/0.2/users bbox, item, source, class, level, limit, country, useDevItem, status, tags, fixable Errors count by error, depends on parameters