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 Resource

 

This method is used to create a resource for a floor.  This will create a draft resource.  Resources may only be created on draft floors.

Method

POST

URL

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

Headers

X-Auth (see Security)

Request Body

Required parameters are underlined.

Parameter

Value

Description

floorId

integer

The identifier of the floor that this resource belongs to.

pdfUrl

string

The URL for the .pdf file associated with this floor.

svgUrl

string

The URL for the .svg file associated with this floor.

zoomLevel

integer

The zoom level for this floor.

{
    "floorId": <integer>,
    "pdfUrl": <string>,
    "svgUrl": <string>,
    "zoomLevel": <integer>
}

Example Request

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

{
    "floorId": 17,
    "pdfUrl": "http://image.com/level1.pdf",
    "svgUrl": "http://image.com/level1.svg",
    "zoomLevel": 0
} 

Response

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

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

See Mapping API Response Handling for error payloads.

Example Response

Example body of successful response:

{
    "data": 
	{
        "id": 71
    }
}

ON THIS PAGE

 

 

  • No labels