Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 campus.

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>
            }
        },
        {
            "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>
            }
        },
        ...
    ]
}

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
            }
        },
        {
            "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
            }
        }
    ]
}

ON THIS PAGE

 

 

  • No labels