Retrieving devices bounded by latitude and longitude

You can use the Topology API to retrieve all devices bounded by latitude and longitude.

Syntax

Specify the following parameters within a REST client.

Table 1. Parameters for devices bounded by latitude and longitude

Parameter

Value
Method GET
URL root
https://HOST:PORT/ROOT-CONTEXT/nm_rest/topology/locations/bounds
Where:
  • HOST is the hostname or IP address of the Dashboard Application Services Hub server.
  • PORT is the secure port number of the Dashboard Application Services Hub server. By default, this is 16311.
  • ROOT-CONTEXT is the path from the root of your file system to the Topology API. This path is usually ibm/console.
  • nm_rest/topology completes the path to the Topology API.
  • locations is the name of the function that retrieves data related to geographic views.
Mandatory parameters

The following parameters must be included at the beginning of the URL.

bounds

A rectangle specified by two locations, of the following form:

((north-west latitude, north-west longitude), (south-east latitude, south-east longitude))

The latitudes and longitudes are in decimal degrees. Positive latitudes are north of the equator, and positive longitudes are east of the Greenwich meridian. A single whitespace character is optional after the commas for readability.

The following is an example of the bounds parameter:
((34.461276680644175, -99.68994179687502), (37.13404478358378, -95.29541054687502))
Optional parameters

The following parameters can be included in any order.

aggToRegion
A boolean value that defines whether locations are aggregated to their containing region. The default is true.
classType
A comma-separated list of ClassIds to include or exclude, depending on the value of the include parameter. If both the classType and domain parameters are specified, then only those entities that match both filters are included or excluded. For information on retrieving class data, see Retrieving class data.
domain
A comma-separated list of DomainMgrIds to include or exclude, depending on the value of the include parameter. If both the classType and domain parameters are specified, then only those entities that match both filters are included or excluded. For information on retrieving domain data, see Retrieving domain data.
include
A boolean value that defines whether domains and classType are inclusive (true) or exclusive (false). The default is false.
lazyLoad
A boolean value that defines whether to include additional information in the query. The default is true.
Example URL
https://myHost:16311/ibm/console/nm_rest/topology/locations?bounds=((34.461276680644175, -99.68994179687502), (37.13404478358378, -95.29541054687502))?domain=1,2
Content Type application/json
Note: For examples of the output format that applies to this call, see Retrieving locations and Retrieving specific devices.