Get List of Locations

This API returns a list of locations within a bounding box (bbox) that you define with GPS coordinates.

METHOD GET
URI <production url>/v1/locations/search?{q,bbox,size,page}
Sample Request URI - Intelligent Cities <production url>/v1/locations/search?q=location-type:PARKING_SPOT&bbox=32.711637,-117.157330,32.709443,-117153821&size=20&page=1
Sample Request URI - Intelligent Enterprises <production url>/v1/locations/search?q=location-type:RETAIL-STORE&bbox=30:-100,33.714739:-130

Query Parameters

Parameter Description Required? Filter Values
bbox The bounded area for your search, identified by GPS coordinates. For more information, see the Glossary section. Yes bbox=x1,y1, x2,y2. Replace x1,y1, x2,y2 with GPS coordinates, similar to 32.711637,-117.157330, 32.709443,-117.153821. You can use Google Maps to obtain the latitude and longitude.To locate GPS coordinates for the area and identify the boundaries, place the cursor in the upper left location of the area, then right-click and select What’s here? to obtain the first set of coordinates. Right-click on the lower-right location and repeat this procedure to obtain the second set of coordinates.

q Identifies a "type" query. Yes Query to search by location type.
location-type Filter by type of location. Note the following:
  • If you are using "ie-parking" in your URI, you can use the location-types PARKING_SPOT and PARKING_ZONE only.
  • If you are using "ie-traffic" in your URI, you can use the location-type TRAFFIC_LANE only.
  • If you are using "ie-pedestrian" in your URI, you can use the location-type CROSSWALK only.
No Insert one of the following enumeration codes for a specific event type:
PARKING_SPOT
If you filter by PARKING_SPOT, you receive a list of demarcated parking spaces within the boundaries.
PARKING_ZONE
If you filter by PARKING_ZONE, you receive a list of non-demarcated parking spaces within the boundaries.
CROSSWALK
If you filter by CROSSWALK, you receive a list of pedestrian crosswalks within the boundaries.
TRAFFIC_LANE
If you filter by TRAFFIC_LANE, you receive a list of traffic lanes within the boundaries.
RETAIL-STORE
If you filter by RETAIL-STORE, you receive a list of retail stores within the boundaries.
OTHERS
If you filter by OTHERS, you receive a list of non-standard location types within the boundaries.
location-uid A unique identifier established by a customer or external resource for a specific location within the monitored area. No For example, 93d49017-19d0-416c-9a95-be0bee2a5ed9.
size Maximum number of records to return per page; if none specified, the default is used automatically. No Numerical value.
page Indicates the page number; default value is 0. No Numerical value.

Response Parameters

Parameter Data Type Present? Description
locations Object Yes Identifies, within the brackets ([ ]) each location within the bound area. The response includes the unique (non-GE) location identifier, the GPS coordinates, the location type, and a link to the location using the GE identifier.
location-uid
A unique identifier established by a customer or external resource for a specific location within the monitored area. For example, a12835g2-0b4a-4019-b9dc-886439413e76.
coordinates
GPS coordinates identifying the location. Four coordinates should be provided for each location-uid.
location-type
Indicates the type of specific location, as follows:
  • PARKING = parking location.
  • PARKING_SPOT = demarcated parking location.
  • PARKING_ZONE = non-demarcated parking location.
  • CROSSWALK = pedestrian crosswalk.
  • TRAFFIC_LANE = lane for moving vehicles.
  • RETAIL-STORE = retail store
  • OTHERS = non-standard location types.
_links
self = Link to the location details using the GE identifier. See Get Location Details for information on obtaining additional data.
To see the device-id, see Get Location Details.
_links Array Yes A collection of hyperlinks to navigate the result set using paging.
page Number Yes Pageable information satisfying the search filter.
….size Number No Maximum number of records to return per page, such as 2.
….totalElements Number No Total number of elements, such as 8.
….totalPages Number No Total number of pages, such as 1.
….number Number No Indicates the page number displayed when returned. Default value is 0.

Sample Response - Intelligent Cities

{
  "_embedded": {
    "locations": [
      {
        "location-uid": "93d49017-19d0-416c-9a95-be0bee2a5ed9",
        "location-type": "PARKING_SPOT",
        "coordinates": {
          "p1": "32.714728,-117.15755915342955",
          "p2": "32.714728,-117.15760863817061",
          "p3": "32.71475,-117.15760863817061",
          "p4": "32.71475,-117.15755915342955"
        },
        "_links": {
          "self": {
            "href": "/locations/100000076"
          }
        }
      },
      {
        "location-uid": "a04935f1-0f3a-5038-b0fc-995239413e76",
        "location-type": "PARKING_SPOT",
        "coordinates": {
          "p1": "32.714728,-117.15755915342952",
          "p2": "32.714728,-117.15760863817061",
          "p3": "32.71475,-117.15760863817060",
          "p4": "32.71475,-117.15755915342955"
        },
        "_links": {
          "self": {
            "href": "/locations/1000000077"
          }
        }
      }
    ]
  },
  "_links": {
     "first": {
      "href": "/locations/search?q=location-type:PARKING_SPOT&bbox=x1,y1,x2,y2&page=0&size=2"
    },
    "self": {
      "href": "/locations/search?q=location-type:PARKING_SPOT&bbox=x1,y1,x2,y2&page0&size=2"
    },
    "next": {
      "href": "/locations/search?q=location-type:PARKING_SPOT&bbox=x1,y1,x2,y2&page=1&size=2"
    },
    "last": {
      "href":/locations/search?q=location-type:PARKING_SPOT&bbox=x1,y1,x2,y2&page=2&size=2”
    }  },
    "page": {
    "size": 2,
    "totalElements": 8,
    "totalPages": 4,
    "number": 0
  } 
}

Sample Response - Intelligent Enterprises

{
  "_embedded": {
    "locations": [
      {
        "coordinates": {
          "P1": "32.711653,-117.157314"
        },
        "_links": {
          "self": {
            "href": "http://ie-environmental-dev.run.aws-usw02-pr.ice.predix.io/v1/locations/1000000106"
          }
        },
        "location-uid": "store-003",
        "location-type": "RETAIL-STORE"
      },
      {
        "coordinates": {
          "P1": "32.706721,-121.931677"
        },
        "_links": {
          "self": {
            "href": "http://ie-environmental-dev.run.aws-usw02-pr.ice.predix.io/v1/locations/1000000093"
          }
        },
        "location-uid": "store-002",
        "location-type": "RETAIL-STORE"
      },
      {
        "coordinates": {
          "P1": "32.762178,-121.964145"
        },
        "_links": {
          "self": {
            "href": "http://ie-environmental-dev.run.aws-usw02-pr.ice.predix.io/v1/locations/1000000092"
          }
        },
        "location-uid": "store-001",
        "location-type": "RETAIL-STORE"
      }
    ]
  },
  "_links": {
    "self": {
      "href": "http://ie-environmental-dev.run.aws-usw02-pr.ice.predix.io/v1/locations/search?q=location-type:RETAIL_STORE&bbox=30:-100,33.714739:-130"
    }
  },
  "page": {
    "size": 25,
    "totalElements": 3,
    "totalPages": 1,
    "number": 0
  }
}