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.

Create a Segment

 

This method is used to create a segment.   Segments may only be created via this method on draft floors.

Method

POST

URL

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

Headers

X-Auth (see Security)

Request Body

Required parameters are underlined.

Parameter

Value

Description

startPointId

integer

The identifier of the starting point of the segment.

endPointId

integer

The identifier of the ending point of the segment

floorId

integer

The identifier of the floor that the start and end points are on.

{
    "startPointId": <integer>,
    "endPointId": <integer>,
    "floorId": <integer>
}

Example Request

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

{
    "startPointId": 78757,
    "endPointId": 78758,
    "floorId": 17
}

Response

A successful response will have a 200 status code and a body containing the newly created segment's ID:

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

See Mapping API Response Handling for error payloads.

Example Response

Example body of successful response:

{
    "data": 
	{
        "id": 512
    }
}

ON THIS PAGE

  • No labels