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.

Reset a Building's Routes

 

This method is used to reset a building's routes. It will delete all routes associated with the building and regenerate them.

Method

POST

URL

http://map-api.phunware.com/v1.1/routes/reset

Headers

X-Auth (see Security)

Request Body

Required parameters are underlined.

Parameter

Value

Description

buildingId

integer

The identifier of the building for which to generate routes.

draftStatusstringEither "LIVE" or "DRAFT". Defaults to "LIVE".
{
	"buildingId": <integer>
} 

Example Request

POST the following request body to: http://map-api.phunware.com/v1.1/routes/reset

{
	"buildingId": 6891
} 

Response

A success response will return a 202 status code with no data in the body of the response.

If route generation is in progress, a 423 "Locked" status code will be returned with a response body like the below:

{
    "data": 
	{
        "message": "Resource locked"
    }
} 

To check for reset completion, use the Retrieve a Collection of Routes GET method and specify the floor ID parameter. 

If route generation is still in progress, a 202 response status code will be returned with an empty set of results to indicate that the resource is not currently available. Example response body:

{
    "data": [],
    "pagination": 
	{
        "results": 
		{
            "from": 0,
            "to": 0,
            "total": 0
        },
        "pages": 
		{
            "current": 1,
            "prev": null,
            "next": null,
            "total": 1
        }
    },
    "expiry": "2014-07-23T20:48:03Z"
}

If route generation fails, a 500-series status code will be returned. See Mapping API Response Handling for error payloads. 

ON THIS PAGE

 

 

  • No labels