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 Count of Routes

 

This method is used to retrieve the number of routes that match search criteria.

Method

GET

URL

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

Headers

X-Auth (see Security)

Query Parameters

Required parameters are underlined. While floorId, startPointId and endPointId are marked as required, only one is necessary for a successful request.

Parameter

Value

Description

floorId

integer

The ID of the floor to get the routes for.

startPointId

integer

The ID of the starting point to match routes against.

endPointId

string

The ID of the ending point to match routes against.

isAccessible

bool

Specifies whether to return accessible routes only.

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

Example Query Fragment

{
	"startPointId": 78757, "isAccessible": true, "floorId": 17, "limit": 2
} 

URL-encoded, minified fragment:

%7B%22startPointId%22%3A78757%2C%22isAccessible%22%3Atrue%2C%22floorId%22%3A17%2C%22limit%22%3A2%7D

Example Request

GET
http://map-api.phunware.com/v1.1/routes/count?%7B%22startPointId%22%3A78757%2C%22isAccessible%22%3Atrue%2C%22floorId%22%3A17%2C%22limit%22%3A2%7D

Response

A successful response will have a 200 status code and a body like the below:

{
    "data": 
	{
        "count": <integer>
    }
} 

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

Example Response

Example body of a successful response:

{
    "data": 
	{
        "count": 2
    }
} 

If route generation is in progress, a 202 "Accepted" 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
        }
    }
}

ON THIS PAGE

 

 

  • No labels