Tiles@home/APIs/version 4

From OpenStreetMap Wiki
< Tiles@home‎ | APIs(Redirected from Tiles@Home/Dev/version 4)
Jump to navigation Jump to search

Api information about the tiles@home 4 server

Design

This new API is based on a PostgreSQL backend that massively uses stored procedures and a mod_python script.

Server API

Requesting the update of a series of tiles

http://www.openstreetmap.fr/tah.py/request_tile_update?x=1&y=2&z=12&p=11&id=user

in which

  • x is the tile coordinate in the longitude axis
  • y is the tile coordinate in the latitude axis
  • z is the first zoom level that should be drawn (valid values are 0, 3, 6, 9 and 12)
  • p is the priority
  • id is a string that helps finding who requested what

the response to this request is either

OK

or an appropriate HTTP error

Requesting a tile set to work on

http://www.openstreetmap.fr/tah.py/grab_job?user=sxpert&password=testpassword&version=test

the typical response should be:

OK|4|<job id>|<x>|<y>|<z>|HAVE FUN

or some error like

XX|4|||||UNAUTHORIZED
XX|4|||||INVALID SOFTWARE VERSION
XX|4|||||CLIENT VERSION DEPRECATED
XX|4|||||NOTHING TO DO

Requesting an upload ticket for a job

http://www.openstreetmap.fr/tah.py/get_upload_ticket?user=sxpert&password=testpassword&job_id=2

typical response is:

OK|4|19498c1537138a66116c53e6bc50514f|SEE YOU SOON

or some error like

XX|4||UNAUTHORIZED
XX|4||JOB NOT ASSIGNED TO USER
XX|4||TICKET ALREADY ASSIGNED

note that a ticket is only issued once.