Hi, I'm creating a client for OSM api. I'm failing to create a changeset. (I'm using developers' url). I'm sending followings in header. oauth_token,oauth_consumer_key,oauth_signature_method,oauth_version,oauth_nonce,oauth_timestamp And message body as follows:
After sending data to server using PUT, I'm receiving http 500 response (Application error). Could someone help to solve this issue please? Thanks! asked 13 Nov '12, 16:25 buddhima Harry Wood |
The detail is on the wiki page. You need to submit the page with an HTTP PUT. answered 14 Nov '12, 20:28 ChrisH Hi, I was following that wiki page.But fails. can someone give me a full details of a successful http PUT request to OSM Thanks
(15 Nov '12, 03:40)
buddhima
You may have an authentication problem. Check this page about OAuth in OSM : http://wiki.openstreetmap.org/wiki/OAuth
(15 Nov '12, 12:51)
Pieren
Hi, It's not a problem with authentication, since I'm getting a token and a secret after Access Token step. Thanks
(16 Nov '12, 14:11)
buddhima
i have latitude and longitude of a location. i want to upload xml file about this location to add POI.where should i use lat and long? In changset?
(20 Nov '15, 05:42)
Er Pawan Verma
@Er Pawan Verma: to the node object. See the documentation for the API - e.g. about nodes. Please keep in mind that you should not create objects automatically.
(20 Nov '15, 05:58)
aseerel4c26 ♦
How can i put changeset? when i dont know.
(20 Nov '15, 06:02)
Er Pawan Verma
showing 5 of 7
show 2 more comments
|
Hi All, Thanks for the help, specially scai. Message should follow following format in body.
The above message format worked finally ! answered 14 Dec '12, 15:50 buddhima |
I don't know exactly the reason for the 500 error code, but you are at least missing the xml tag. Here are the header and body of a PUT request to /api/0.6/changeset/create from a recent JOSM version: header:
body:
Also make sure to always include the comment and created_by tag in your changesets. answered 15 Nov '12, 06:59 scai ♦ Hi, In API spec. it is not mentioned to add xml tag. I failed even it is added. is it necessary to add version,generator attributes to osm tag? and id, open attributes in changeset tag? I also would appriciate, if you can give me an example of PUT with headers too. (eg: Content-Type,etc.) Thanks!
(18 Nov '12, 19:06)
buddhima
I've added a header. You can use a program like wireshark or tcpdump yourself to read network packets of JOSM or other programs. I'm not familiar with the API details so I can't say anything about which XML attributes are required and which not. Just try it if you can't find anything in the API documentation about this.
(18 Nov '12, 21:00)
scai ♦
|
Silly question : which URI are you using ? /api/0.6/changeset/create
Did you try first with only one <changeset> element ?
Hi, url is http://api06.dev.openstreetmap.org/api/0.6/changeset/create Yes, I've tried with only one element too. But the result is same