Cell resource
From IW Challenge - Developer
Cell resource can be used to query the location of a cell base station. If you can get mcc, mnc and cellid from the mobile device, you can use this resource to get an approximate location of the device.
Restrictions
- Works only with Sonera SIMs at the moment.
Resource
Related resources
Location resource
XML schema
http://api.medialab.sonera.fi/iw/schema/Location
XML format
Content-type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cell>
<lat>60.316391</lat>
<lon>20.994058</lon>
<mcc>244</mcc>
<mnc>91</mnc>
<lac>0</lac>
<cellid>10038</cellid>
<name>Brändö</name>
</cell>
JSON format
JSON reply is provided if HTTP header key Accept is set to application/json
Content-type: application/json
{"cell":{
"lat" : "60.316391",
"lon" : "20.994058",
"mcc" : "244",
"mnc" : "91",
"lac" : "0",
"cellid" : "10038",
"name" : "Brändö"
}}
GET (Read)
Read Cell resource. Returns the Cell resource as a XML or JSON document. Default format is XML. Result is in JSON format if request header "Accept" is set to "application/json".
Response codes
Examples
Example curl request:
$ curl -X GET -i "http://api.medialab.sonera.fi/iw/rest/cell/244/91/10038?userKey=your-user-key&serviceKey=your-service-key"
HTTP/1.1 200 OK
Date: Thu, 19 Mar 2009 11:01:26 GMT
Server: Apache/2.2
Content-Length: 312
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cell>
<lat>60.316391</lat>
<lon>20.994058</lon>
<mcc>244</mcc>
<mnc>91</mnc>
<lac>0</lac>
<cellid>10038</cellid>
<name>Brändö</name>
</cell>