Download a relation using XAPI

I’m trying to use XAPI to download a relation by using its unique id.

I’ve tried http://xapi.openstreetmap.org/api/0.6/relation[ref=383665] and …/relation[id=383665] but neither work. I get an empty file.

If I use …/relation[name=Howardian Hills] then it works ok but I’d rather use the unique reference number.

What am I doing wrong? It’s late and I’ve had a long week!

Thanks,
Steve

I don’t think this is possible using Xapi. But you can do this using the standard API.
eg to download the XML for that relation, use: http://www.openstreetmap.org/api/0.6/relation/383665
You can get this by going to the browse page for that relation, then the “Download XML” link at the bottom of the page. eg http://www.openstreetmap.org/browse/relation/383665

Though note this doesn’t include the members of the relation as Xapi does, only the relation itself.

If the relation is listed on a page on the wiki (example: http://wiki.openstreetmap.org/wiki/Florida/State_and_County_Road_Relations), you can click the “j” link to open it in josm.

I tried this but it didn’t work - it couldn’t find the server http://localhost:8111/import?url=http://api.openstreetmap.org/api/0.6/relation/383665.

Do I need to configure something?

I don’t think so - you had josm already open, right?

open the relation page http://www.openstreetmap.org/browse/relation/383665 , copy the link from “download xml” into the clipboard, open josm, press ctrl+L , paste the URL with ctrl+v and append a /full at the end to download all members.
( http://www.openstreetmap.org/api/0.6/relation/383665/full )

“Do I need to configure something?”
Yes, you need the JOSM remote plugin.

Thanks NE2 and Nightdive.