Folder Layout

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

JSON Table

Attribute Data Type Description
type String The layout type. The expected value is folderlayout.
location application/json The location for which the layout information is defined. This is a JSON object. For details about the JSON, click Location.
length long Length (horizontal length) of the layout.
width long Width (vertical length) of the layout.
unit String Unit in which the layout is measured. The applicable values are FEET and METER.
imageKey String Key to access the image attached to this layout. The key is appended to webservice/sfiles?id=
lastModifiedTime long When was the layout last modified.

Copy Sample JSON
Sample JSON
{
    "type": "folderlayout",
    "location": {
        "type": "folderlocation",
        "id": {
            "type": "locallocationid",
            "id": 2
        },
        "parentId": {
            "type": "locallocationid",
            "id": 0
        },
        "name": "Pune",
        "accessibleToUser": true,
        "defaultLocation": false,
        "timezoneId": "Asia/Calcutta",
        "children": [
            {
                "type": "locallocationid",
                "id": 3
            },
            {
                "type": "locallocationid",
                "id": 4
            }
        ]
    },
    "length": 1500,
    "width": 1323,
    "unit": "FEET",
    "imageKey": "f49f575c-d8ab-4fcf-b081-cc0d44ad4d86",
    "lastModifiedTime": 1469613043601
}
API Calls

/V5/layouts

/V5/layouts/image

/V5/layouts/image

/V5/layouts

Get Layout For a Folder Location

Description This API is used to fetch the folder layout details at a location.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/layouts
Sample
GET https://training.mojonetworks.com/new/webservice/v5/layouts?locationid=125

Here,

  • locationid

    The parameter takes an integer value specifying the ID of the folder location for which the layout is to be fetched. To retrieve location ID refer Location.

Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the folder layout that is being fetched at a location. The response body contains the folder layout details. The response is in the application/json format.

Get Image Attached to a Folder  Location

Description This API is used to fetch the image attached to a location.
Users with the roles can call this API: superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/layouts/image?locationid=<value>

Here,

  • locationid

    The parameter takes an integer value specifying the ID of the location for which the layout is to be fetched. To retrieve location ID refer Location.

Sample
GET https://training.mojonetworks.com/new/webservice/v5/layouts/image?locationid=125
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the link to the image file that is to be downloaded. The link contains the system-generated key for the image loaded in the server cache for the provided location. A sample response is as follows:

webservice/sfiles?id=e4e2f7cb-57a4-46f6-a9cc-d79989f8e2e1

Attach Image to a Folder Location

Description This API is used to attach an image to a location.
Users with the following roles can call this API: superuser, administrator, and operator.
Syntax
POST <Base_URL>/layouts/image?locationid=<value>

Here,

  • locationid

    The parameter takes an integer value specifying the ID of the location for which the layout is to be fetched. To retrieve location ID refer Location.

Sample
POST https://training.mojonetworks.com/new/webservice/v5/layouts?locationid=125
Request Body The request body accepts multipart/form-data with the key as uploadedFile.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the layout to which the image is attached. The response is in the application/json format.

Delete Layout for a Folder Location

Description This API is used to delete the layout of a location.
Users with the following roles can call this API: superuser, administrator, and operator.
Syntax
DELETE <Base_URL>/layouts?locationid=<value>

Here,

  • locationid

    The parameter takes an integer value specifying the ID of the location for which the layout is to be deleted. To retrieve location ID refer Location.

Sample
DELETE https://training.mojonetworks.com/new/webservice/v5/layouts?locationid=125
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 204.
The response body does not contain any other information.