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 Segments

 

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

Method

GET

URL

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

Headers

X-Auth (see Security)

Query Parameters

Required parameters are underlined.

Parameter

Value

Description

floorId

integer

Identifier of the floor.

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

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

Example Query Fragment

{
	"floorId": 17
}  

URL-encoded, minified fragment:

%7B%22floorId%22%3A17%7D  

Example Request 

GET
http://map-api.phunware.com/v1.1/segments?%7B%22floorId%22%3A17%7D 

Response

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

{
    "data": 
	[
        {
            "id": <integer>,
            "startPointId": <integer>,
            "endPointId": <integer>,
            "floorId": <integer>,
            "createdAt": <string>,
            "updatedAt": <string>,
            "externalId": <integer>
        },
        {
            "id": <integer>,
            "startPointId": <integer>,
            "endPointId": <integer>,
            "floorId": <integer>,
            "createdAt": <string>,
            "updatedAt": <string>,
            "externalId": <integer>
        },
        ...
    ],
    "pagination": 
	{
        "results": <object>,
        "pages": <object>
    }
}

See Mapping API Response Handling for error payloads. 

Example Response

Example body of a successful response:

{
    "data": 
	[
        {
            "id": 512,
            "startPointId": 78757,
            "endPointId": 78758,
            "floorId": 17,
            "createdAt": "2014-04-09T19:16:31Z",
            "updatedAt": "2014-04-09T19:16:31Z",
            "externalId": 512
        },
        {
            "id": 521,
            "startPointId": 57787,
            "endPointId": 57788,
            "floorId": 17,
            "createdAt": "2014-04-09T19:16:31Z",
            "updatedAt": "2014-04-09T19:16:31Z",
            "externalId": 521
        }
    ],
    "pagination": 
	{
        "results": 
		{
            "from": 1,
            "to": 2,
            "total": 2
        },
        "pages": 
		{
            "current": 1,
            "prev": null,
            "next": null,
            "total": 2
        }
    }
}

ON THIS PAGE

 

 

  • No labels