WebSphere brand IBM WebSphere Telecom Web Services Server, Version 7.1

Location interface

The getLocationForGroup operation is available for the Location interface using the REST API. This operation is based on the Parlay X 2.1 standard.

Note: In the following examples, replace path with the following URL:
  • For REST: http://hostName:port/TerminalLocationService/services/REST
  • For JSON: http://hostName:port/TerminalLocationService/services/JSON

For JSON requests, only HTTP POST is supported.

For JSON requests, the field names need to match exactly with the Parlay X 2.1 specifications. The JSON implementation does not supply any default values to the fields.

getLocationForGroup via HTTP-GET

Based on the Parlay X 2.1 operation of the same name, this operation allows you to ask the network for the location of a terminal (or terminals). One or more terminal device addresses can be specified in the request.

Sample REST request
GET path/location?address=tel:+447990123456&address=tel:+447990121212&accuracy=100 HTTP/1.1
Host: www.example.com
Note: As stated in the Parlay X 2.1 based Service Implementations location operations, acceptableAccuracy and tolerance are required parameters. You can supply these parameters, in the request URL as in this example:
GET path/location?address=tel:+447990123456&address=tel:+447990121212&accuracy=100&acceptableAccuracy=150&tolerance=NoDelay

If you do not supply those two parameters, the REST implementation supplies a default value of 1000 (mts) for acceptableAccuracy and a default value of DelayTolerant for tolerance.

This behavior does not apply for JSON scenarios.

Sample REST response
HTTP Status: 200/OK
<GetLocationResponse version="1.0"
<location address=tel:+447990123456
timestamp="Tues, 15 Nov 1994 08:12:31 GMT"
longitude="-5.932617" latitude="54.601505"
altitude="10.0" accuracy="100"/>
<location address=”tel:+447990121212”  
 timestamp
longitude="-6.03581" latitude="54.782351" 
altitude="10.0" accuracy="100"/>
</GetLocationResponse>
Sample JSON request
POST http://localhost:9080/TerminalLocationService/services/JSON/location
{
 addresses": ["tel:+1234", "tel:456"]
"requestedAccuracy" : 100,
"acceptableAccuracy" : 110,
"tolerance":"NoDelay"
} 
Sample JSON response
HTTP/1.1 200 OK
---------------
{"result": [
      {
"address" :"tel:+1234",
"reportStatus": "Retrieved",
"currentLocation":         {
"latitude":51.497345,
"longitude":-2.4006863,
"altitude": 0,
"accuracy": 100,
"timestamp": "2010-02-10T12:04:05"
 }
},
  }
"address": "tel:+456",
"reportStatus": "Retrieved",
"currentLocation":       {
"latitude": 150,
"longitude": 150,
"altitude": 150,
"accuracy": 100,
"timestamp": "2014-06-09T15:15:04"
  }
 }
]}



Terms of use
(C) Copyright IBM Corporation 2009. All Rights Reserved.