Skip to end of metadata
Go to start of metadata

This documentation is no longer actively supported and may be out of date. Going forward, please visit and bookmark our new site (https://docs.phunware.com/) for up-to-date documentation.

Retrieve a Collection of Points by Floor and/or Building

 

This method is used to retrieve an array of points on a floor that satisfy search criteria.

Method

GET

URL

http://map-api.phunware.com/v1.1/points

Headers

X-Auth (see Security)

Query Parameters

Required parameters are underlined. While both "floorId" and "buildingId" are marked as required, either one is sufficient.

Parameter

Value

Description

floorId

integer

Return points that are on this floor.

buildingId

integer

Return points that are in this building.

filter

object

Object containing an array of valid response body fields. Used to reduce the response payload for each point to only the fields specified in the request.

The "id" field is always returned whether or not it is explicitly specified.

isActiveBooleanDescribes whether to search for active (“true”) or inactive (“false”) points. Both active and inactive points will be retrieved by default. 

limit

integer

Specifies the number of results to return. This is useful for pagination.  

Default value: 10

Maximum value: 100

offset

integer

Specifies the number of results to offset. This is useful for pagination.

Default value: 0

poiOnlyBoolean
  • If true, returns only points of interest. 
  • If false, returns all points (including waypoints). 

Default value: false

draftStatusstringEither "LIVE" or "DRAFT". Defaults to "LIVE".

Example Query Fragment

Example without filter(s):

{
	"floorId": 17,
	"buildingId": 6891
} 

URL-encoded, minified fragment of example without filter(s):

%7B%22floorId%22%3A17%2C%22buildingId%22%3A6891%7D

Example with filter(s):

{
    "floorId": 17,
    "buildingId": 6891,
    "filter": 
	{
        "include": 
		[
            "name",
            "isAccessible",
            "location"
        ]
    }
}

URL-encoded, minified fragment of example with filter(s):

%7B%22floorId%22%3A17%2C%22buildingId%22%3A6891%22filter%22%3A%7B%22include%22%3A%5B%22name%22%2C%22isAccessible%22%2C%22location%22%5D%7D%7D 

Example Request

Example without filter(s):

GET
http://map-api.phunware.com/v1.1/points?%7B%22floorId%22%3A1%2C%22buildingId%22%3A1%7D

Example with filter(s):

GET
http://map-api.phunware.com/v1.1/points?%7B%22floorId%22%3A17%2C%22buildingId%22%3A6891%22filter%22%3A%7B%22include%22%3A%5B%22name%22%2C%22isAccessible%22%2C%22location%22%5D%7D%7D 

Response

A successful response will have a 200 status code and an array of points that satisfy the query parameters:

{
    "data": 
	[
        <point object 1>,
        <point object 2>,
        ...
    ], 
	"pagination": 
	{
        "results": 
		{
            "from": <integer>,
            "to": <integer>,
            "total": <integer>
        },
        "pages": 
		{
            "current": <integer>,
            "prev": <integer>,
            "next": <integer>,
            "total": <integer>
        }
    }
}

See Mapping API Response Handling for error payloads.

Example Response

Example body of a successful response without filters (continued on the next page):

{
    "data": 
	[
        {
            "id": 78757,
            "name": "The Throne Room",
            "poiType": 2,
            "category": null,
            "description": "Where Zelda sits when not hostage elsewhere.",
            "isActive": true,
            "imageUrl": "http://www.image.com/point.png",
            "customIconImageUrl": "http://www.image.com/throne1.png",
            "x": 43,
            "y": 81,
            "isExit": true,
            "isAccessible": true,
            "portalId": null,
            "level": 1,
            "annotation": "exit from courtyard",
            "zoomLevel": 2,
            "maxZoomLevel": -1,
            "floorId": 17,
            "buildingId": 6891,
            "metaData": null,
            "createdAt": "2013-09-04T13:32:55Z",
            "updatedAt": "2013-09-04T13:32:55Z",
            "location": 
			{
                "latitude": 37.12345,
                "longitude": 97.01234
            },
            "externalId": 78757
        },
        {
            "id": 78758,
            "name": "Dungeon",
            "poiType": 2,
            "category": null,
            "description": "Where rupees are hidden in jars.",
            "isActive": true,
            "imageUrl": "http://www.image.com/point.png",
            "customIconImageUrl": "http://www.image.com/dungeon1.png",
            "x": 34,
            "y": 18,
            "isExit": true,
            "isAccessible": true,
            "portalId": null,
            "level": 1,
            "annotation": "exit from Great Hall",
            "zoomLevel": 2,
            "maxZoomLevel": -1,
            "floorId": 18,
            "buildingId": 6891,
            "metaData": null,
            "createdAt": "2013-09-04T13:32:55Z",
            "updatedAt": "2013-09-04T13:32:55Z",
            "location": 
			{
                "latitude": 73.12345,
                "longitude": 79.01234
            },
            "externalId": 78758
        }
    ],
	"pagination": 
	{
        "results": 
		{
            "from": 1,
            "to": 2,
            "total": 61
        },
        "pages": 
		{
            "current": 1,
            "prev": null,
            "next": 2,
            "total": 2
        }
    }
} 

Example body of a successful response with filter(s):

{
    "data": 
	[
        {
            "id": 78757,
            "name": "The Throne Room",
            "isAccessible": true,
            "location": 
			{
                "latitude": 37.12345,
                "longitude": 97.01234
            },
            "externalId": 78757
        },
        {
            "id": 78758,
            "name": "Dungeon",
            "isAccessible": true,
            "location": 
			{
                "latitude": 73.12345,
                "longitude": 79.01234
            },
            "externalId": 78758
        }
    ],
	"pagination": 
	{
        "results": 
		{
            "from": 1,
            "to": 2,
            "total": 61
        },
        "pages": 
		{
            "current": 1,
            "prev": null,
            "next": null,
            "total": 1
        }
    }
}

ON THIS PAGE

 

 

  • No labels