Exchange protocol curl

Here is some commands for quick query testing.

Note. Replace demo64.geo2tag.org with server name, where you want to run queries.

Subscribe channel
curl -d "{\"auth_token\":\"KKKKKKKKKK\",\"channel\":\"Public announcements\"}" http://demo64.geo2tag.org/service/subscribe

AvailableChannel list
curl -d "{\"auth_token\":\"KKKKKKKKKK\"}" http://demo64.geo2tag.org/service/channels

Owned channels
curl -d "{\"auth_token\":\"KKKKKKKKKK\"}" http://demo64.geo2tag.org/service/owned

Subscribed channels
curl -d "{\"auth_token\":\"KKKKKKKKKK\"}" http://demo64.geo2tag.org/service/subscribed

WriteTag
curl -d "{ \"auth_token\" : \"KKKKKKKKKK\", \"channel\" : \"My channel\", \"description\" : \"this tag was generated automaticaly by tracker application\", \"latitude\" : 60.0, \"altitude\":30.0, \"link\" : \"unknown\", \"longitude\" : 30.0, \"time\" : \"04 03 2011 15:33:47.630\", \"title\" : \"tracker's tag\" }" http://demo64.geo2tag.org/service/writeTag

ApplyChannel
curl -d "{\"auth_token\":\"KKKKKKKKKK\", \"name\":\"New channel\", \"description\":\"my new super chanel\", \"url\":\"http://osll.spb.ru/\", \ \"activeRadius\":3000}" http://demo64.geo2tag.org/service/addChannel

LoadTags
curl -d "{\"auth_token\":\"KKKKKKKKKK\",\"latitude\":30.0, \"longitude\":60.0, \"radius\":30.0}" http://demo64.geo2tag.org/service/loadTags

Unsubscribe channel
curl -d "{\"auth_token\":\"KKKKKKKKKK\",\"channel\":\"Public announcements\"}" http://demo64.geo2tag.org/service/unsubscribe

Login
curl -d "{\"login\":\"Mark\",\"password\":\"test\"}" http://demo64.geo2tag.org/service/login

DeleteUser
curl -d "{\"login\":\"Mark\",\"password\":\"test\"}" http://demo64.geo2tag.org/service/deleteUser

Add user
curl -d "{\"email\":\"Vasja@mail.org\", \"login\":\"Vasja\",\"password\":\"VasjaPWD\"}" http://demo64.geo2tag.org/service/addUser

Register user
curl -d "{\"email\":\"Vasja@mail.org\", \"login\":\"Vasja\",\"password\":\"VasjaPWD\"}" http://demo64.geo2tag.org/service/registerUser

Quit session
curl -d "{\"auth_token\":\"MMMMMMMMMM\"}" http://demo64.geo2tag.org/service/quitSession

Add channel
curl -d "{\"auth_token\":\"MMMMMMMMMM\", \"name\":\"Fuel prices\", \"description\":\"my new super chanel\", \"url\":\"http://osll.spb.ru\", \"activeRadius\":3000}" http://demo64.geo2tag.org/service/addChannel

Quit the system
curl -d "{\"auth_token\":\"KKKKKKKKKK\"}" http://demo64.geo2tag.org/service/quitSession

Circle filter
curl -d '{"auth_token":"MMMMMMMMMM", "time_from":"04 03 2011 15:33:47.630", "time_to":"31 12 2011 15:33:47.630", "latitude":60.1632, "longitude":24.8593, "radius":30.0 }'  http://demo64.geo2tag.org/service/filterCircle

Rectange filter
curl -d '{"auth_token":"MMMMMMMMMM", "time_from":"04 03 2011 15:33:47.630", "time_to":"31 12 2011 15:33:47.630", "latitude_shift":{ "latitude1":0.0 ,"latitude2": 100.0}, "longitude_shift":{ "longitude1":0.0 ,"longitude2": 100.0} }' http://demo64.geo2tag.org/service/filterRectangle

Polygon filter
curl -d '{"auth_token":"MMMMMMMMMM", "time_from":"04 03 2011 15:33:47.630", "time_to":"31 12 2011 15:33:47.630", "polygon" : [{ "number":0,"latitude":0.0,"longitude":0.0 }, { "number":1,"latitude":70.0, "longitude":0.0 }, { "number":2, "latitude":70.0, "longitude":100.0 } ] }' http://demo64.geo2tag.org/service/filterPolygon

Cylinder filter
curl -d '{"auth_token":"MMMMMMMMMM", "time_from":"04 03 2011 15:33:47.630", "time_to":"31 12 2011 15:33:47.630", "latitude":60.1632, "longitude":24.8593, "radius":30.0, "altitude_shift":{ "altitude1":-1.0 ,"altitude2": 1.0} }'  http://demo64.geo2tag.org/service/filterCylinder

Box filter
curl -d '{"auth_token":"MMMMMMMMMM", "time_from":"04 03 2011 15:33:47.630", "time_to":"31 12 2011 15:33:47.630", "latitude_shift":{ "latitude1":0.0 ,"latitude2": 100.0}, "longitude_shift":{ "longitude1":0.0 ,"longitude2": 100.0}, "altitude_shift":{ "altitude1":-1.0 ,"altitude2": 1.0} }' http://demo64.geo2tag.org/service/filterBox

Fence filter
curl -d '{"auth_token":"MMMMMMMMMM", "time_from":"04 03 2011 15:33:47.630", "time_to":"31 12 2011 15:33:47.630", "polygon" : [{ "number":0,"latitude":0.0,"longitude":0.0 }, { "number":1,"latitude":70.0, "longitude":0.0 }, { "number":2, "latitude":70.0, "longitude":100.0 } ], "altitude_shift":{ "altitude1":-1.0 ,"altitude2": 1.0} }' http://demo64.geo2tag.org/service/filterFence

Channel filter
curl -d "{\"auth_token\":\"MMMMMMMMMM\",\"channel\":\"Sales\", \"amount\":100}" http://demo64.geo2tag.org/service/filterChannel

Substring filter
curl -d "{ \"auth_token\" : \"MMMMMMMMMM\", \"field\" : \"description\", \"substring\" : \"Saint\"}" http://localhost/service/filterSubstring

Alter channel
curl -d "{\"auth_token\":\"MMMMMMMMMM\",\"name\":\"Sales\", \"field\":\"url\", \"value\":\"ya.ru\"}" http://demo64.geo2tag.org/service/alterChannel

Change password
curl -d "{\"login\":\"mark\",\"password\":\"oldpassword\", \"new_password\":\"newpassw\"}" http://demo64.geo2tag.org/service/changePassword

Version
curl http://demo64.geo2tag.org/service/version

Build
curl http://demo64.geo2tag.org/service/build