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 Buildings

 

This method is used to retrieve an array of buildings that satisfy search criteria.

Method

GET

URL

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

Headers

X-Auth (see Security)

Query Parameters

Required parameters are underlined.

Parameter

Value

Description

campusId

integer

The identifier of the campus.

name

string

The name of the building.

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

Example Query Fragment

{
	"campusId": 1986
} 

URL-encoded, minified fragment:

%7B%22campusId%22%3A1986%7D

Example Request 

GET
http://map-api.phunware.com/v1.1/buildings?%7B%22campusId%22%3A1986%7D

Response

A successful response will have a 200 status code and a body containing array of buildings that satisfy the query parameters:

"data":
{
    [
        {
            "id": <integer>,
            "campusId": <integer>,
            "name": <string>,
            "latitude": <float>,
            "longitude": <float>,
            "streetAddress": <string>,
            "createdAt": <string>,
            "updatedAt": <string>,
            "floors": <objectcontainingdataforanyfloors>,
            "venueGuid": <string>,
            "location": 
			{
                "latitude": <float>,
                "longitude": <float>
            },
            "externalId": <integer>
        },
        {
            "id": <integer>,
            "campusId": <integer>,
            "name": <string>,
            "latitude": <float>,
            "longitude": <float>,
            "streetAddress": <string>,
            "createdAt": <string>,
            "updatedAt": <string>,
            "floors": null,
            "venueGuid": <string>,
            "location": 
			{
                "latitude": <float>,
                "longitude": <float>
            },
            "externalId": <integer>
        },
        ...
    ]
}

See Mapping API Response Handling for error payloads. 

Example Response

Example body of a successful response:

{
    "data": 
	[
        {
            "id": 5,
            "campusId": 1986,
            "name": "Hyrule Castle Tower",
            "latitude": 30.25,
            "longitude": 97.75,
            "streetAddress": "123 Ocarina",
            "createdAt": "2014-06-06T18:25:26Z",
            "updatedAt": "2014-06-06T18:25:33Z",
            "floors": null,
            "venueGuid": "03521872-2845-4024-896d-5fa0ab555c12",
            "location": 
			{
                "latitude": 30.25,
                "longitude": 97.75
            },
            "externalId": 5
        },
        {
            "id": 2,
            "campusId": 1986,
            "name": "Hyrule Castle Graveyard",
            "latitude": 31.25,
            "longitude": 98.75,
            "streetAddress": "123 Spirit Tracks",
            "createdAt": "2014-06-06T18:25:26Z",
            "updatedAt": "2014-06-06T18:25:33Z",
            "floors": null,
            "venueGuid": "03521872-2845-4024-896d-5fa0ab555c12",
            "location": 
			{
                "latitude": 31.25,
                "longitude": 98.75
            },
            "externalId": 2
        }
    ]
}

ON THIS PAGE

 

 

  • No labels