0% found this document useful (0 votes)
59 views82 pages

BLSS v7.0.0 - RESTful API User Guide - v2

The Brightlayer Software Suite RESTful API User Guide provides comprehensive instructions for accessing and managing data within the system via a RESTful API. It includes details on authentication, service endpoints for devices, locations, ports, and cables, as well as troubleshooting common issues. The document is intended for users looking to interact with the API for various operations such as creating, updating, and querying resources.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views82 pages

BLSS v7.0.0 - RESTful API User Guide - v2

The Brightlayer Software Suite RESTful API User Guide provides comprehensive instructions for accessing and managing data within the system via a RESTful API. It includes details on authentication, service endpoints for devices, locations, ports, and cables, as well as troubleshooting common issues. The document is intended for users looking to interact with the API for various operations such as creating, updating, and querying resources.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 82

Brightlayer Software Suite

RESTful API User Guide


Release 7.0.0

July 2023

Version 2
Eaton
Proprietary and Confidential

www.Eaton.com/VCOM
LEGAL NOTICE
Copyright © 1999–2023. Eaton All rights reserved. The contents of this document constitute valuable proprietary and
confidential property of Eaton and are provided subject to specific obligations of confidentiality set forth in one or more
binding legal agreements. Any use of this material is limited strictly to the uses specifically authorized in the applicable
license agreement(s) pursuant to which such material has been furnished. Any use or disclosure of all or any part of this
material not specifically authorized in writing by Eaton is strictly prohibited.

2 Contents
Contact Support
For your convenience, Eaton provides one site where you can access the information that you need for
our DCIM products. You can access the resources listed below by going to
https://support.optimumpathinc.com.

• Online and telephone contact information for technical assistance and customer services
• Product and documentation downloads
• Other helpful resources appropriate for your product

3 Contents
Contents
Contents ........................................................................................................................................................ 4
1. Introduction .............................................................................................................................................. 8
1.1. What is a RESTful API? ....................................................................................................................... 8
2. Prerequisites and Examples ...................................................................................................................... 9
2.1. Tools Required ................................................................................................................................... 9
2.2. Examples Steps .................................................................................................................................. 9
2.2.1. Step one – Set up the Authentication Type ............................................................................... 9
2.2.2. Step two – Set up the Request Header .................................................................................... 10
2.2.3. Step three – Set up the Request Body ..................................................................................... 10
2.2.4. Step four – Review the response from the BLSS server ........................................................... 11
3. Services ................................................................................................................................................... 12
3.1. Service Overview ............................................................................................................................. 12
3.2. Device Service .................................................................................................................................. 12
3.2.1. Create a device ......................................................................................................................... 13
3.2.2. Create multiple devices ............................................................................................................ 13
3.2.3. Create a device with groups ..................................................................................................... 14
3.2.4. Create a device with attributes ................................................................................................ 15
3.2.5. Create a device with application .............................................................................................. 15
3.2.6. Create a device with location ................................................................................................... 16
3.2.7. Update device name or description ......................................................................................... 17
3.2.8. Move device ............................................................................................................................. 17
3.2.9. Update device attributes.......................................................................................................... 18
3.2.10. Update device groups ............................................................................................................ 19
3.2.11. Assign or remove device ........................................................................................................ 20
3.2.12. Query device list ..................................................................................................................... 20
3.2.13. Query device with filter .......................................................................................................... 21
3.2.14. Query device port................................................................................................................... 22
3.2.15. Query device cables ............................................................................................................... 22
3.2.16. Query device static attribute detail value .............................................................................. 23
3.2.17. Query device static attribute value ........................................................................................ 23
3.2.18. Query device monitor attribute value.................................................................................... 24

4 Contents
3.2.19. Delete a device ....................................................................................................................... 25
3.2.20. Decommission a device .......................................................................................................... 25
3.2.21. Get device info ....................................................................................................................... 25
3.2.22. Save device pline .................................................................................................................... 26
3.2.23. Save device pline (Multi) ........................................................................................................ 27
3.2.24. Save device vendor ................................................................................................................ 27
3.2.25. Save device vendor (Multi)..................................................................................................... 28
3.2.26. Save device model .................................................................................................................. 29
3.2.27. Save device model (Multi) ...................................................................................................... 29
3.2.28. Get device pline list ................................................................................................................ 30
3.2.29. Get device model list .............................................................................................................. 31
3.2.30. Get device vendor list............................................................................................................. 31
3.2.31. Get device type list ................................................................................................................. 32
3.2.32. Export device events .............................................................................................................. 32
3.2.33. Get device info(S) ................................................................................................................... 33
3.2.34. Get device info(G) .................................................................................................................. 34
3.2.35. Save attribute value ............................................................................................................... 34
3.3. Location Service ............................................................................................................................... 35
3.3.1. Create or modify a location...................................................................................................... 35
3.3.2. Create or modify a location with attributes ............................................................................. 35
3.3.3. Create or modify multi locations.............................................................................................. 36
3.3.4. Delete a location ...................................................................................................................... 37
3.3.5. Get location list ........................................................................................................................ 38
3.4. Port Service ...................................................................................................................................... 38
3.4.1. Create a port ............................................................................................................................ 38
3.5. Cable Service.................................................................................................................................... 39
3.5.1. Create or modify a cable .......................................................................................................... 39
3.5.2. Delete a cable ........................................................................................................................... 40
3.5.3. Get cable type .......................................................................................................................... 41
3.6. System Service ................................................................................................................................. 41
3.6.1. Get category ............................................................................................................................. 41
3.6.2. Get category list ....................................................................................................................... 42
3.6.3. Get attribute list ....................................................................................................................... 42

5 Contents
3.6.4. Query attribute......................................................................................................................... 43
3.6.5. Get rack capacity ...................................................................................................................... 43
3.6.6. Assign device group.................................................................................................................. 43
3.6.7. Assign users .............................................................................................................................. 44
3.6.8. Delete company ....................................................................................................................... 44
3.6.9. Delete department ................................................................................................................... 45
3.6.10. Delete device group ............................................................................................................... 45
3.6.11. Delete user group ................................................................................................................... 45
3.6.12. Get company list..................................................................................................................... 46
3.6.13. Get department list ................................................................................................................ 46
3.6.14. Get device group ACL ............................................................................................................. 47
3.6.15. Get device group list .............................................................................................................. 47
3.6.16. Get probe list .......................................................................................................................... 48
3.6.17. Get unit define ....................................................................................................................... 48
3.6.18. Get user ACL ........................................................................................................................... 48
3.6.19. Get user group list .................................................................................................................. 49
3.6.20. Get user list ............................................................................................................................ 49
3.6.21. Save company ........................................................................................................................ 50
3.6.22. Save department .................................................................................................................... 51
3.6.23. Save device group .................................................................................................................. 51
3.6.24. Save user group ...................................................................................................................... 52
3.6.25. Save user ................................................................................................................................ 52
3.6.26. Get Enc&Blade Relation ......................................................................................................... 53
3.6.27. Get location shape ................................................................................................................. 53
3.6.28. Get device position................................................................................................................. 54
3.6.29. Get rack shape........................................................................................................................ 54
3.6.30. Get location Acl ...................................................................................................................... 55
3.6.31. Get rack detail ........................................................................................................................ 56
3.6.32. Get device list ......................................................................................................................... 57
3.6.33. Export device events .............................................................................................................. 57
3.6.34. Get alarm info ........................................................................................................................ 58
3.7. Audit Service .................................................................................................................................... 61
3.7.1. Cancel audit .............................................................................................................................. 61

6 Contents
3.7.2. Delete audit .............................................................................................................................. 62
3.7.3. Export audit detail .................................................................................................................... 62
3.7.4. Export audit list ........................................................................................................................ 62
3.7.5. Get audit list ............................................................................................................................. 63
3.7.6. Get audit list(G) ........................................................................................................................ 63
3.7.7. Get audit racks ......................................................................................................................... 64
3.7.8. Save audit map ......................................................................................................................... 64
3.7.9. Recreate data base ................................................................................................................... 65
3.7.10. Save audit ............................................................................................................................... 65
3.8. Monitor Service ............................................................................................................................... 66
3.8.1. Save Template Trigger .............................................................................................................. 66
3.9. API Input .......................................................................................................................................... 69
3.10. Company and Department API calls .............................................................................................. 72
4. Troubleshooting and Common Mistakes ................................................................................................ 82
4.1. HTTP 400 Bad Request..................................................................................................................... 82
4.2. HTTP 401 Unauthorized ................................................................................................................... 82
4.3. 4HTTP 403 Forbidden ...................................................................................................................... 82
4.4. HTTP 404 Not Found ........................................................................................................................ 82
4.5. HTTP 409 Conflict ............................................................................................................................ 82
4.6. HTTP 415 Unsupported Media Type ............................................................................................... 82
4.7. HTTP 500 Internal Server Error ........................................................................................................ 82

7 Contents
1. Introduction
The REST API provides rich access to data within the system to other management systems via web-
based communications. Data contained within the application is available for retrieval and may also be
created, updated, or deleted where appropriate. Successful authentication is required for access to any
data in the system.

1.1. What is a RESTful API?


Representational State Transfer (REST) provides a powerful, easy-to-use and standard mechanism by
which different systems can communicate with each other by sending and receiving data. This
mechanism is a web service that is formalized in an Application Programming Interface (API) that defines
what services the server provides.

A RESTful application contains resources that are accessed through endpoints using HTTP methods.

REST is based on resources, which are logical representations of documents, data, customers, parts, or
just about anything else. Resources make up the “object model” exposed by the system. BLSS contains
resources representing devices, racks, alarms and a number of other items of interest in the system.

A resource has a resource representation that is used to transfer information about it between a client
and the server. In practice, the term “resource” is often used to refer to the resource itself or its
representation in transit since the precise distinction is not usually important. When the distinction is
relevant, the more precise term is typically used or is made obvious by the context. Two common
representations in RESTful applications are JSON and XML, which simply define how the data is
formatted in transit.

The client and server negotiate the data format using the HTTP header Content-Type to indicate what
format is being sent and accept to indicate what format(s) can be accepted.

REST resources each have a unique endpoint, which is a URL address that identifies where that resource
can be found. REST endpoints are accessed using standard HTTP methods.

• GET is used to retrieve a resource (or a collection of resources) from the server
• POST is used to create a new resource on the server
• PUT is used to update an existing resource on the server with the representation of that
resource from the client
• DELETE is used to delete a resource from the server

8 Introduction
2. Prerequisites and Examples
2.1. Tools Required
To invoke with the REST API interactively, a user can install Postman from
https://www.getpostman.com/. The Postman application allows the user to interact with the REST API
directly and visually. To invoke the REST API on the server without UI access, a user can use any HTTP
Client SDK in any desired programming language, such as the Java-based HTTP Client SDK from Apache
by visiting https://hc.apache.org/httpcomponents-client-ga/.

2.2. Examples Steps


The following steps demonstrate how to obtain the complete device list (for detailed API call description
refer to 3.2.13 Query device with filter) from the database using Postman. Please ensure to substitute
{{HOST_NAME}} in the following screenshots with the actual BLSS URL.

2.2.1. Step one – Set up the Authentication Type


Before data can be accessed using the REST API, the external system or client must log into the Basic
Auth. A successful login requires an HTTP POST of credentials to the authentication endpoint with a valid
username and password (application username and password). Upon successful authentication, a token
will be returned to the client that must be provided with subsequent requests. The user must include
the application username and password in the Request Header.

After the POST method is selected and the URL link (substitute {{HOSTNAME}} with the actual BLSS URL)
is filled in, as illustrated in the screenshot images below, perform these steps:

1. Select the Authorization tab in Postman.


2. Select the Basic Auth as the Type.
3. Fill in the correct BLSS application user ID and password.
Note: Username is case sensitive. In application version 6.5 the username will not be case
sensitive.
4. Click on the Update Request button.

9 Prerequisites and Examples


2.2.2. Step two – Set up the Request Header
It is important to set the Content-Type to application/json

In the screenshot image below, perform these steps:

1. Select the Headers Tab


2. Set the Content-Type as application/json

2.2.3. Step three – Set up the Request Body


In this step, construct the HTTP Request Body properly and submit the request as illustrated in the
screenshot below.

1. Select the POST as the Request Type


2. Enter the correct REST API call and substitute the {{HOST_NAME}} with the actual BLSS URL
3. Select the Body tab
4. Enter the desired request body text by referring to the REST API doc. Note the page_size value
controls how many objects returns at one time as a “page”, and the page_idx controls what
specific “page” to return.

10 Prerequisites and Examples


2.2.4. Step four – Review the response from the BLSS server
If the above request is processed successfully, BLSS server will return Status Code as 200 OK. Always
check the status code first at the top righthand corner above the response data window as shown in the
screenshot image below. Each returned data object, in this case: device, is described by the XML text
between the curly brackets {}.

11 Prerequisites and Examples


3. Services
3.1. Service Overview
Endpoints Description
devices Device Resource Representations
1. Create devices
2. Update devices
3. Query devices
4. Delete devices
5. Create, Modify Query Device Pline, Vendor, Model
locations Location Resource Representations
1. Create location
2. Update location
3. Query location
4. Delete location
ports Device Port Resource Representations
1. Create ports
2. Update ports
3. Query ports
4. Delete ports
cables Cable Resource Representations
1. Create cables
2. Update cables
3. Query cables
4. Delete cables
system System Resource Representations
1. Query Category
2. Query attributes
3. Query Rack Capacity
4. Create Company, Department, User, User Group
5. Query Company, Department, User, User Group
6. Query Location, User, Device Group Acl
audit Audit Resource Representations
1. Save Audit
2. Delete Audit
3. Cancel Audit
4. Get Audit List
5. Export Audit details
6. Recreate Database
Monitor Monitor Resource Representations
1. Save template trigger

3.2. Device Service


Note: If table input does not have data, user should use BLSS web URL. For example, if the BLSS web URL
is vdc50-4249.op, replace {host} with vdc50-4249.op. Otherwise, the user needs to fill in the expected
parameters into the body such as the input example below.

12 Services
3.2.1. Create a device
Method Post
URL http://{host}/rest/devices
Description Create a device
Input name
model_id (device model uuid)
Input example {
"name": "ql_test_device",
"model_id": "00007aea-6a85-11e0-9d37-001d091dd9dd",
"description": "test"
}
Output device uuid,
device name,
device type uuid
Output example {
"code": "1",
"data": {
"dtype_id": "00007aea-6a85-11e0-9d37-001d091dd9dd",
"type_id": null,
"name": "0000",
"model": null,
"id": "9accfc75-005c-4d21-9434-62cdd3e32596",
"type": null
}
}

3.2.2. Create multiple devices


Method Post
URL http://{host}/rest/devices/multi
Description Create multiple devices
Input name
model_id (device model uuid)
Input example [{
"id":"012fab14-a1fb-4d86-890f-3129e3332797",
"name":"0614ql_test_device",
"model_id":"00007aea-6a85-11e0-9d37-001d091dd9dd"
}, {
"id":"012fab14-a1fb-4d86-890f-3129e3332897",
"name":"0614ql_test_device1",
"model_id":"00007aea-6a85-11e0-9d37-001d091dd9dd"
}]
Output dtype_id: device type uuid
name
id: device uuid
Output example {
"code": "1",
"data": [
{
"dtype_id": "00007aea-6a85-11e0-9d37-001d091dd9dd",

13 Services
"type_id": null,
"name": "0614ql_test_device",
"model": null,
"id": "012fab14-a1fb-4d86-890f-3129e3332797",
"type": null
},
{
"dtype_id": "00007aea-6a85-11e0-9d37-001d091dd9dd",
"type_id": null,
"name": "0614ql_test_device1",
"model": null,
"id": "012fab14-a1fb-4d86-890f-3129e3332897",
"type": null
}
]
}

3.2.3. Create a device with groups


Method Post
URL http://{host}/rest/devices
Description Create a device with groups
Input name
model id: device model id
dgroup: system device group sid. Customer can through the Get device MTPVG list get
the sids. [Get]
http://{{test}}/rest/devices/mtpvg/5?page_idx=1&page_size=10)
Input example {
"name":"0526 with group12313",
"model_id":"{{model id}}",
"description": "this is for test",
"dgroups": ["141","6037"]
}
Output dtype_id: device type uuid
name: device name
id: device uuid
Output example {
"code": "1",
"data": {
"dtype_id": "9f8e15a4-978d-11e2-8c01-005056000016",
"type_id": null,
"name": "0526 with group12313",
"model": null,
"id": "89c27e15-92a5-4ffd-a527-8ec63170a3c1",
"type": null
}
}

14 Services
3.2.4. Create a device with attributes
Method Post
URL http://{host}/rest/devices
Description Create a device with attributes
Input name
model_id
attribute id: Customer can through the Get attribute API get the attribute id. ([Get]
http://{{test}}/rest/devices/props?name=asset tag)
attribute value
attribute unit
Note: Customer need fill the attribute id, other attribute information not required.
Input example {
"name": " BLSS api test",
"model_id":"9942ec6a-9f8e-11e3-ad2c-005056000016",
"description": "this is for test",
"attributes": [
{"id":"0aeddd86-ce3c-11dd-8da6-001d091dd9dd",
"value":"api 1",
"unit": null
},
{
"id":"0aedd732-ce3c-11dd-9a2f-001d091dd9dd",
"value":"518.19",
"unit": "W"
}
]
}
Output dtype_id: device type uuid
name: device name
id: device uuid
Output example {
"code": "1",
"data": {
"dtype_id": "9942ec6a-9f8e-11e3-ad2c-005056000016",
"type_id": null,
"name": " BLSS api test",
"model": null,
"id": "b1f248c7-a393-4202-a221-762004013bb5",
"type": null
}
}

3.2.5. Create a device with application


Method Post
URL http://{host}/rest/devices
Description Create a device with application
Input name
model_id (device model uuid)
application action:1

15 Services
application name
Input example {
"name":"0614 applications",
"model_id":"9f8e15a4-978d-11e2-8c01-005056000016",
"applications": [{"action":1,"software":"MyAPI"}]
}
Output dtype_id: device type uuid
name
id: device uuid
Output example {
"code": "1",
"data": {
"dtype_id": "9f8e15a4-978d-11e2-8c01-005056000016",
"type_id": null,
"name": "0614 appliaction1",
"model": null,
"id": "e8687e69-a188-48f5-b0ca-fa3f95f09023",
"type": null
}
}

3.2.6. Create a device with location


Note: When using this API to create devices, the floor or area should have a Grid. The user needs to
provide the loc_row and loc_column values. If the user does not provide these two values, the device
location on the floor will be assigned by default.

Method Post
URL http://{host}/rest/devices
Description Create a device with location
Input name
model_id: device model uuid
location_id: Customer can through the get location list get the location id
information([Get] http://{{test}}/rest/locations/list)
loc_row
loc_column
Input example {
"name": "0526 with row and column1",
"model_id":"9f8e15a4-978d-11e2-8c01-005056000016",
"description": "this is for test",
"location_id": "7b67c7d6-3f79-11e7-9b71-afde2064dbaa",
"loc_row": "1",
"loc_column": "C"
}
Output dtype_id: device type uuid
name
id: device uuid
Output example {
"code": "1",
"data": {
"dtype_id": "9f8e15a4-978d-11e2-8c01-005056000016",

16 Services
"type_id": null,
"name": "0526 with row and column1",
"model": null,
"id": "a58bea9a-20f9-4fe1-a08f-8ab40205fab0",
"type": null
}
}

3.2.7. Update device name or description


Method Post
URL http://{host}/rest/devices
Description Update device name or description
Input id: device uuid
name
model_id
description
Input example {
"id": "a6d05bd0-edf4-460e-91eb-1e4ddc6e30f5",
"name": "0615updatedevices111",
"model_id": "00007aea-6a85-11e0-9d37-001d091dd9dd",
"description": "this is for tests111"
}
Output device uuid
device name,
device model uuid
Output example {
"code": "1",
"data": {
"dtype_id": "00007aea-6a85-11e0-9d37-001d091dd9dd",
"type_id": null,
"name": "0615updatedevices111",
"model": null,
"id": "a6d05bd0-edf4-460e-91eb-1e4ddc6e30f5",
"type": null
}
}

3.2.8. Move device


Note: The user needs to provide the loc_row and loc_column values. If user does not provide these two
values, the device location on the floor will be assigned by default.

Method Post
URL http://{host}/rest/devices
Description Move device
Input name
id: device uuid
model_id: device model uuid
location_id

17 Services
location: location name
loc_row
loc_column
Input example {
"name": "0615 device with location test1",
"id": "4510e463-eaf4-4468-960c-6a49a402fe18",
"model_id": "9f8e15a4-978d-11e2-8c01-005056000016",
"location_id": "50524f32-9e14-4696-9cc5-408a821f755c",
"location": "A3",
"loc_row": "6",
"loc_column": "C"
}
Output device name
device id
device type_id
Output example {
"code": "1",
"data": {
"dtype_id": "9f8e15a4-978d-11e2-8c01-005056000016",
"type_id": null,
"name": "0615 device with location test1",
"model": null,
"id": "4510e463-eaf4-4468-960c-6a49a402fe18",
"type": null
}
}

3.2.9. Update device attributes


Method Post
URL http://{host}/rest/devices
Description Update device attributes
Input id: device uuid
model_id: device model uuid
name: device name
attributes id: attribute uuid
attribute value
attribute unit
Input example {
"id": "c56408ac-dc52-4579-a344-de43388815e2",
"model_id": "1bd289be-4d88-11de-8f54-001d091dd9dd",
"name": " BLSS api test2",
"description": "REST API",
"attributes": [
{"id": "0aeddd86-ce3c-11dd-8da6-001d091dd9dd",
"value": "API 2 modify asset tag",
"unit": null
},
{
"id": "0aedd732-ce3c-11dd-9a2f-001d091dd9dd",
"value": "201705121903",
"unit": null
18 Services
}
]}
Output dtype_id: device type uuid
name: device name
id: device uuid
Output example {
"code": "1",
"data": {
"dtype_id": "1bd289be-4d88-11de-8f54-001d091dd9dd",
"type_id": null,
"name": " BLSS api test2",
"model": null,
"id": "c56408ac-dc52-4579-a344-de43388815e2",
"type": null
}
}

3.2.10. Update device groups


Method Post
URL http://{host}/rest/devices
Description Update the device groups
Input id: device uuid
name: device name
model_id: device model uuid
action: 1|2. 1 means add, 2 means remove.
dgroups: group sid
Input example {
"id": "973b2198-ba47-4e0d-b2e3-79235246f572",
"name": "0116switch",
"model_id": "f661dad4-44e2-11de-8f84-000d566af2f2",
"description": "this is for tests",
"dgroups": [{"action":2,"dg_id":141}, {"action":1,"dg_id":143}]
}
Output dtype_id: device type uuid
name
id: device uuid
Output example {
"code": "1",
"data": {
"dtype_id": "f661dad4-44e2-11de-8f84-000d566af2f2",
"type_id": null,
"name": "0116switch",
"model": null,
"id": "973b2198-ba47-4e0d-b2e3-79235246f572",
"type": null
}
}

19 Services
3.2.11. Assign or remove device
Note: If user provides the u_position, part_id, shelf_id, or slots_id, we will not check docking of the
device. If user does not fill the above attribute values, we will reference docking to deploy the device.
Additional note: xr (x axis), r (y axis) and zr (z axis) refer to device rotation, px, py and pzrefer to device
position.

It seems that both of them works well.

Method Post
URL http://{host}/rest/floorplan/plan
Description Assign or remove the device to device or location
Input id: mount device uuid
pid: mount device parent uuid
action: 1|2. 1 means add, 2 means remove
ptype_id:1|2. 1means mount device to device, 2 means mount device to floor.
u_position, part_id, shelf_id, slots_id
docking{xr,r,zr,px,py,pz}

Notice: u_position (example: 12.0 or –12.0 ), part_id (example: "side_left" or


"side_right"or "door") , shelf_id (example: 1), slots_id (example: "1,2,3" ) , docking
(example: {"xr":90,"r":90,"px":1,"py":1,"pz":1} ) only need one,
slots_id
Input example [{
"id": "f6de9a4c-a8c2-4537-abcb-03d3d08c74d4",
"pid": "f6de9a4c-a8c2-4537-abcb-03d3d08c74d4",
"action": 1,
"ptype_id": 1,
"u_position": 12.0
}]
Output
Output example {
"code": "1",
"message": "Success"
}

3.2.12. Query device list


Method Get
URL http://{host}/rest/devices/list
Description Get device list
Input page_idx: page index
page_size: page size
Input example http://{{test}}/rest/devices/list?page_idx=1&page_size=100
Output
Output example {
"code": "1",
"data": {
"count": 47264,
"list": [
{
20 Services
"type_uuid": "6dca16b6-6209-11de-94fa-001d091dd9dd",
"name": "0000(1)",
"model_uuid": "cfc72cdc-cd8b-11e6-b58b-005056000197",
"model": "1228test",
"id": 41232,
"type": "Access Control",
"uuid": "7e211713-43d7-49eb-9fa3-a7e69ca6f79e"}]
}
}

3.2.13. Query device with filter


Method Post
URL http://{{test}}/rest/devices/list
Description Get device list with filter
Input name: device name
model_id: device model uuid
mname: device model name
type_id: device type id or uuid
tname: device type name
pline_id: device pline id or uuid
pname: device pline name
vendor_id: device vendor id or uuid
vname: device vendor name
status: device life cycle
only_racks: boolean true only get rack
only_encs: boolean true only get encs
only_pdus : boolean true only get pdus
only_switchs: boolean true only get switchs
only_servers: boolean true only get servers
page_idx: page index
page_size: page size
filters: (Device Attributes)
vname: Attribute vname or attribute id.
Unit: Attribute unit.
Value: Attribute value.
Action:
1. like
2. Equal
3. In
Input example {
"name": "0518Server",
"page_idx": 1,
"page_size": 100
}
Output
Output example {
"code": "1",
"data": {
"count": 11,
"list": [
{
21 Services
"type_uuid": "59e3262e-cd7b-11dd-81bf-001d091dd9dd",
"name": "0518Server",
"model_uuid": "c4f3569e-3d97-5d9e-b607-2f07a8147556",
"model": "1000v",
"id": 58586,
"type": "Server - Rackmount",
"uuid": "770683b1-13bd-4736-91cb-a872747cf2b0"}]
}
}

3.2.14. Query device port


Method Get
URL http://{host}/rest/cable/device_port/{device id}?h5=true
Description Get device ports information
Input Device UUID
Input example http://{{test}}/rest/cable/device_port/ d02322be-efc9-45ff-9ad3-
017e65f37fe0?h5=true
Output
Output example {
"phase": null,
"type_name": "network outlet RJ45",
"base_type": "n",
"vlan": null,
"device_id": "d02322be-efc9-45ff-9ad3-017e65f37fe0",
"type_id": "3eeb97ee-a87e-11e0-83da-001d091dd9dd",
"name": "no 01",
"id": "7b1ee15e-58d3-58ac-8b6f-71057e9191fc",
"tag": null,
"used": true
}

3.2.15. Query device cables


Method Get
URL http://{host}/rest/cable/device_cable/device id
Description Get device cables information.
Input Device UUID
Input example http://{{test}}/rest/cable/device_cable/d02322be-efc9-45ff-9ad3-017e65f37fe0
Output
Output example {
"sport_id": "25b7ad5b-2212-5ae2-b309-351cb4210b6c",
"sport_name": "no 02",
"sport_tag": null,
"type_name": "Generic Network Cable",
"dport_id": "0c63b8a4-4fb6-5344-9eb9-af8b62b646f1",
"color": "#FF0000FF",
"type_id": "ceac853c-1777-11e2-aeda-00241d120212",
"usage": null,
"length": null,

22 Services
"dport_tag": "R",
"dport_name": "no 09: [Back side connector]",
"sdevice_id": "d02322be-efc9-45ff-9ad3-017e65f37fe0",
"ddevice_id": "4ffbc8be-1f64-4ab9-90d6-b3c9aa799133",
"sdevice_name": "0104-switch",
"base_type": "n",
"name": "New Cable",
"ddevice_name": "0104-pp",
"id": "41e71163-14d6-8dbf-6ecb-66be1bcc1b56",
"sn": null,
"status": null
}

3.2.16. Query device static attribute detail value


Method Get
URL http://{{test}}/rest/devices/props/value?id={id}&type_id=1
Description Get the filled type attributes information
Input device uuid
Input example http://{{test}}/rest/devices/props/value?id= 696f4ca2-170d-4435-bfc2-1b8179d8e174
&type_id=1
Output
Output example {
"is_enum": "false",
"value_type_id": 2,
"pname": "Common",
"pid": "7e38d70e-66b8-11de-9c3b-000d566af2f2",
"dr_visable": false,
"is_script": "false",
"remove": "false",
"unit": null,
"is_need": false,
"read_only": "false",
"inherit": "false",
"name": "Department ID",
"action": "default",
"by_system": "true",
"id": "37bcabba-4b16-11e3-8155-005056000011",
"value": null,
"reback": "false"
}

3.2.17. Query device static attribute value


Method Get
URL http://{{test}}/rest/devices/ins/props/?id={deviceid}type_id=1
Description Get the filled type attributes information
Input Device uuid
Input example http://{{test}}/rest/devices/ins/props?id=6479af47-39fa-48d8-94ca-61a0bbd3f8f4
&type_id=1

23 Services
Output
Output example {
"code": "1",
"data": [
{
"unit": null,
"value_type_id": 1,
"name": "Name",
"value": "002185410 42U1.1"}
]
}

3.2.18. Query device monitor attribute value


Method Post
URL http://{host}/rest/mtemplates/resources/v2/list
Description Get device Monitored attribute value
Input target_id: device uuid
Level_id: 6 ( default )
_value: true ( default )
_no_tree: true ( default )
ma_id: attrubute uuid
page_idx: page index
page_size: page size
Input example {
"target_id": "d02322be-efc9-45ff-9ad3-017e65f37fe0",
"level_id": 6,
"_value": true,
"_no_tree": true,
"page_idx":-1,
"page_size":-1
}
Output
Output example {
"code": "1",
"data": {
"count":10,
"list": [
{
"value": "33",
"unit": "kW" ,
"name": "Active Power",
"ma_id": "37bcabba-4b16-11e3-8155-005056000011",
"last_time": "2017-06-16 16:06:01.065+08"
}
]
}

24 Services
3.2.19. Delete a device
Method Delete
URL http://{host}/rest/devices/{{device id}}
Description Delete a device
Input Device UUID, multi pattern (id, id)
Input example http://{host}/rest/devices/6479af47-39fa-48d8-94ca-61a0bbd3f8f4
Output
Output example {
"code": "1"
}

3.2.20. Decommission a device


Method Get
URL http://{host}/rest/devices/decommission/{id}
Description Decommission a device
Input Device UUID, multi pattern (id, id)
Input example http://{host}/rest/devices/decommission/7d019500-d9af-4081-8ee4-94d439eac2a8
Output null
Output example {
"code": "1"s
}

3.2.21. Get device info


Method Post
URL http://{host}/rest/devices/{id}
Description Get device basic info
Input id: Device uuid, multi pattern (id, id)
mtpv: True return device model, pline, vendor and type info.
monitor: True return device monitor point info else not
trans_unit: True transform attribute value unit else not.
flat: True output attribute value flat else not.
attributes: True return device all attribute else not
ports: True return device all ports else not.
pd_ids: Device attribute id list. (Hot Key: location, position, ip, owner, alarm, usize,
dgroups, mac, fireware, status) If the attribute no contains in the hot key, please fill
the attribute name or uuid.
ma_ids: Ma id or Monitor template resource id.
Input example {
"mtpv": true,
"attributes": true,
"pd_ids": [
"location",
"position",
"dgroups"
]
}
Output
25 Services
Output example {
"code": "1",
"data": {
"count": 2,
"list": [
{
"type_uuid": "59f63ab6-cd7b-11dd-9daf-001d091dd9dd",
"name": "0111-lori-RPDU",
"model_uuid": "633bbf96-1b1d-11e5-b086-000c294c98b1",
"model": "AP8958",
"id": 156,
"type": "PDU - Rackmount",
"uuid": "f448b282-da58-4f57-b502-3cb8d905ecde"
},
{
"type_uuid": "59e83b82-cd7b-11dd-ba1d-001d091dd9dd",
"name": "0216-switch (1)",
"model_uuid": "efa7794a-a35d-11e3-8e5e-005056000016",
"model": "4250T",
"id": 148,
"type": "Switch",
"uuid": "65131bcc-6d56-48ab-b1d9-3f5183d30cf7"}
]
}
}

3.2.22. Save device pline


Method Post
URL http://host-server/rest/devices/plines
Description Create or modify device pline
Input host-server url,
id: pline uuid
name: pline name
vendor_id: Device vendor uuid
description: pline description
Input example {
"name":"0720 test device pline",
"vendor_id":"e9a01172-1062-4324-8be4-a4de859252f2"
}
Output
Output example {
"code": "1",
"data": {
"vendor_id": "e9a01172-1062-4324-8be4-a4de859252f2",
"name": "0720 test device pline",
"description": null,
"id": "540a4f01-32df-4894-9a07-d7a941e3fad0"
}
}

26 Services
3.2.23. Save device pline (Multi)
Method Post
URL http://host-server/rest/devices/plines/multi
Description Create or modify device pline(Multi)
Input host-server url,
id: pline uuid
name: pline name
vendor_id: Device vendor uuid
description: pline description
Input example [
{
"name":"0720 test device pline multi1",
"vendor_id":"e9a01172-1062-4324-8be4-a4de859252f2"
},
{
"name":"0720 test device pline multi2",
"vendor_id":"702d9bf1-1564-4b7a-862f-2d86736d08ad"
}
]
Output {
"code": "1",
"data": {
"vendor_id": "e9a01172-1062-4324-8be4-a4de859252f2",
"name": "0720 test device pline",
"description": null,
"id": "540a4f01-32df-4894-9a07-d7a941e3fad0"
}
}
Output example {
"code": "1",
"data": [
{
"vendor_id": "e9a01172-1062-4324-8be4-a4de859252f2",
"name": "0720 test device pline multi1",
"description": null,
"id": "cbbf5996-ff8d-45b5-9775-b5fe47a85441"
},
{
"vendor_id": "702d9bf1-1564-4b7a-862f-2d86736d08ad",
"name": "0720 test device pline multi2",
"description": null,
"id": "7257099d-c60f-4d6c-b0ea-5814ead41f61"}
]
}

3.2.24. Save device vendor


Method Post
URL http://host-server/rest/devices/vendors
Description Create or modify device vendor

27 Services
Input host-server url,
id: Manufacturer uuid
name: Manufacturer name
description: Manufacturer description
Input example {
"id": "6b12cd7c-cd81-11dd-81b1-001d091dd9dd",
"name": "test vendor 0721"
}
Output
Output example {
"code": "1",
"data": {
"name": "test vendor 0721",
"description": null,
"id": "6b12cd7c-cd81-11dd-81b1-001d091dd9dd"
}
}

3.2.25. Save device vendor (Multi)


Method Post
URL http://host-server/rest/devices/vendors/multi
Description Create or modify device vendor(multi)
Input host-server url,
id: Manufacturer uuid
name: Manufacturer name
description: Manufacturer description
Input example [
{
"name": "test vendor 0721 multi1"
},
{
"name": "test vendor 0721 multi2"
}
]
Output
Output example {
"code": "1",
"data": [
{
"name": "test vendor 0721 multi1",
"description": null,
"id": "e9a01172-1062-4324-8be4-a4de859252f2"
},
{
"name": "test vendor 0721 multi2",
"description": null,
"id": "702d9bf1-1564-4b7a-862f-2d86736d08ad"}
]
}

28 Services
3.2.26. Save device model
Method Post
URL http://host-server/rest/devices/models
Description Create or modify device models
Input host-server url,
id: Device model uuid
name: Device Model name
pline_id: Device pline uuid
type_id: Device type uuid
description: Device Model description
usize: Device accupy rack u size
energy_source: Device energy Source
power_source: Device power source
voltage: Device voltage
energy_type: Device energy type
attributes: Model attributes list.
Input example {
"name":"0720 test device model",
"pline_id":"7305adf0-474f-11e7-a2c0-99ceb598cca6",
"type_id": "59e83b82-cd7b-11dd-ba1d-001d091dd9dd",
"usize":2
}
Output
Output example {
"code": "1",
"data": [
{
"pline_id":"7305adf0-474f-11e7-a2c0-99ceb598cca6",
"type_id": "59e83b82-cd7b-11dd-ba1d-001d091dd9dd",
"name": "0720 test device model ",
"description": null,
"id": "cbbf5996-ff8d-45b5-9775-b5fe47a85441"
}
}

3.2.27. Save device model (Multi)


Method Post
URL http://host-server/rest/devices/models
Description Create or modify device models (Multi)
Input host-server url,
id: Device model uuid
name: Device Model name
pline_id: Device pline uuid
type_id: Device type uuid
description: Device Model description
usize: Device accupy rack u size
energy_source: Device energy Source
power_source: Device power source
voltage: Device voltage

29 Services
energy_type: Device energy type
attributes: Model attributes list.
Input example [
{
"type_id":"59c85e98-cd7b-11dd-96a7-001d091dd9dd",
"name":"0905 Test mODEL 1",
"pline_id":"0fed1234-456a-123a-a90d-fba34bd723ed",
"usize":2
},
{
"type_id":"59c85e98-cd7b-11dd-96a7-001d091dd9dd",
"name":"0905 Test mODEL 1 1",
"pline_id":"0fed1234-456a-123a-a90d-fba34bd723ed",
"usize":2
}
]
Output
Output example {
"code": "1",
"data": [
{
"type_id":"59c85e98-cd7b-11dd-96a7-001d091dd9dd",
"name":"0905 Test mODEL 1",
"pline_id":"0fed1234-456a-123a-a90d-fba34bd723ed",
"id": "cbbf5996-ff8d-45b5-9775-b5fe47a85442"
},
{
"type_id":"59c85e98-cd7b-11dd-96a7-001d091dd9dd",
"name":"0905 Test mODEL 1 1",
"pline_id":"0fed1234-456a-123a-a90d-fba34bd723ed",
"id": "cbbf5996-ff8d-45b5-9775-b5fe47a85443"
}
]
}

3.2.28. Get device pline list


Method Get
URL http://host-server/rest/devices/mtpvg/3
Description Get Device Pline List
Input host-server url,
name: Device pline name used to filter
page_idx: Page Index p
page_size: Page Size
Input example http://host-server/rest/devices/mtpvg/3?name=a&page_idx=1&page_size=10
Output
Output example {
"code": "1",
"data": {
"count": 292,
"list": [
{
30 Services
"dcount": 0,
"type_name": "Pline",
"name": "A100",
"id": "592655b6-30b4-11e3-ac09-005056000016",
"type": 3,
"sid": 3808}
]
}
}

3.2.29. Get device model list


Method Get
URL http://host-server/rest/devices/mtpvg/1
Description Get Device Model List
Input host-server url,
name: Device model name used to filter
page_idx: Page Index
page_size: Page Size
Input example http://host-server/rest/devices/mtpvg/1?name=test&page_idx=1&page_size=10
Output
Output example {
"code": "1",
"data": {
"count": 668,
"list": [
{
"dcount": 0,
"type_name": "Model",
"name": "100",
"id": "5cab71ee-44eb-11de-a0b2-000d566af2f2",
"type": 1,
"sid": 1553}
]
}
}

3.2.30. Get device vendor list


Method Get
URL http://host-server/rest/devices/mtpvg/4
Description Get Device vendor List
Input host-server url,
name: Device Vendor name used to filter
page_idx: Page Index
page_size: Page Size
Input example http://host-server/rest/devices/mtpvg/4?name=A&page_idx=1&page_size=10
Output
Output example {
"code": "1",

31 Services
"data": {
"count": 119,
"list": [
{
"dcount": 0,
"type_name": "Vendor",
"name": "A10 Networks",
"id": "5e9852a2-848e-11e1-948c-001d091dd9dd",
"type": 4,
"sid": 391}
]
}
}

3.2.31. Get device type list


Method Get
URL http://host-server/rest/devices/mtpvg/2
Description Get Device type List
Input host-server url,
name: Device type name used to filter
page_idx: Page Index
page_size: Page Size
Input example http://host-server/rest/devices/mtpvg/2?name=A&page_idx=1&page_size=10
Output
Output example {
"code": "1",
"data": {
"count": 5,
"list": [
{
"dcount": 0,
"type_name": "Type",
"name": "Access Control",
"id": "6dca16b6-6209-11de-94fa-001d091dd9dd",
"type": 2,
"sid": 1054}
]
}
}

3.2.32. Export device events


Method Get
URL http://host-server/rest/devices/revents/export/deb6557e-9bfe-4b15-a0ed-
dfe86d7fd1b4?page_idx=&page_size=&start=&end=&print=true
Description Export device self and children device event
Input host-server url
rack_id: Device uuid, multi pattern (id,id)
start: Start time, units (end -365*24*3600(last year)

32 Services
end: End time, unit s (Get through time. time())
page_idx: Page index
page_size: Page size
print: True pdf and else xlsx
Input example http://vdcdev-5051.op/rest/devices/revents/export/deb6557e-9bfe-4b15-a0ed-
dfe86d7fd1b4?page_idx=1&page_size=100&start=118550506&end=1500865086&print=true
Output
Output example PDF file

3.2.33. Get device info(S)


Method Get
URL http://host-server/rest/devices/dinfo/{id}
Description Get Device basic info
Input host-server url
id: Device uuid, multi pattern (id,id)
Input example http://host-server/rest/devices/dinfo/fc6ff5ff-9d62-4c9d-8da1-
41001d55d2b4?ports=true
Output
Output example {
"pname": "ePDU G3 Managed",
"description": "ePDU MA 38U-C IN: IEC60309 516P6 16A 3P OUT: 18xC13:6xC19",
"mid": "6951d508-b875-5fad-b57a-725a32f52fb8",
"tname": "PDU - Rackmount",
"mname": "EMA6DB35AGD88C1",
"tsid": 609,
"ports": [
{
"phase": "1",
"type_name": "power outlet IEC 60320 C13",
"device_id": "f50e9789-fe08-31ce-ba55-0109b6a1b353",
"type_id": "8a5d89f2-a889-11e0-bb32-001d091dd9dd",
"description": null,
"used": false,
"speed": null,
"network": null,
"base_type": "o",
"vlan": null,
"name": "A1",
"id": "dd65a98b-2d29-5d7d-9424-bfc14251c242",
"tag": null
}
],
"tid": "59f63ab6-cd7b-11dd-9daf-001d091dd9dd",
"sid": 148,
"msid": 23174,
"vname": "Eaton",
"name": "ePDU - B684F18439",
"id": "f50e9789-fe08-31ce-ba55-0109b6a1b353"
}

33 Services
3.2.34. Get device info(G)
Method Get
URL http://host-server/rest/devices/{id}?location=&position=&monitor=&mtpv=&ports=
Description Get Device basic info
Input host-server url
id: Device uuid, multi pattern (id,id)
location: True return device loaction info else not
position: True return device position
monitor: True return device monitor point info else not
mtpv: True return device model, pline and type info.
ports: True return device port list
Input example http://host-server/rest/devices/fc6ff5ff-9d62-4c9d-8da1-
41001d55d2b4?location=true&position=true&monitor=true&mtpv=true
Output
Output example {
"code": "1",
"data": {
"country": "China",
"city": "City 1",
"description": "",
"mid": "5f74dbc6-44e2-11de-b441-000d566af2f2",
"upos": "18.0",
"mname": "1850",
"area_id": 150,
"tid": "59e3262e-cd7b-11dd-81bf-001d091dd9dd",
"building": "Building 1",
"sid": 445, "world": "World",
"id": "fc6ff5ff-9d62-4c9d-8da1-41001d55d2b4",
"state": "Hubei",
"row": "1", "enc": null,
"floor": "F1"
}
}

3.2.35. Save attribute value


Method Post
URL http://seever-host/rest/devices/props/value?id={id}&pid=&type_id=
Notice: type_id: 1 id is device id, 8 id is location id, -1 id is model id, 4 id is cable
Description Save instance attribute value
Input host-server url,
id: Attribute id
value: Attribute value
unit: Attribute unit
action:1 save, 2 Delete
Input example [
{
"action": 1,
"id": "993638a7-2009-4213-950c-17f85cdc5fee",
"value": "123",

34 Services
"unit": "mm"
}
]
Output
Output example {
"code": "1",
"data": {
"path": "images/audit/client_1.0.0.db.zip",
"code": 1,
"size": 25622432,
"md5": "c7ab207d13702dde5c74c8d7dd991f79"
}
}

3.3. Location Service


3.3.1. Create or modify a location
Method Post
URL http://{{host}}/rest/locations
Description Create or modify a location. If the location uuid exists in system, we will modify the
location information. If the location uuid does not exist in system or not filled, we will
add the location.
Input id: location uuid
pid: location parents uuid. Customer can through the get location list API get the
information. [Get]
http://{host}/rest/locations/list)
name: location name
Input example {
"id":"0fbe14a7-9361-4c7c-a308-683cabcd0037",
"pid":"c8376920-69d4-11e1-9c22-53071b5392b8",
"name": "Hu Bei",
"description": "Test"
}
Output
Output example {
"code": "1",
"data": {
"type_id": "9d1746ce-13c0-41e8-b3d8-3ecf8674ec61",
"level_id": 3,
"name": "Hu Bei",
"pid": 105,
"id": null,
"uuid": "0fbe14a7-9361-4c7c-a308-683cabcd0037"}
}

3.3.2. Create or modify a location with attributes


Method Post
URL http://{{test}}/rest/locations
35 Services
Description Create or modify a location with attribute. If the location uuid exists in system, we will
modify the location information. If the location uuid does not exist in system or not
filled, we will add the location.
Input id: location uuid
name: location name
pid: location parents uuid
attributes action
attribute value
id: attributes uuid. Customer can through the get attribute list get the location
attributes uuid. [Get]
http://{{test}}/rest/devices/props/value?type_id=8&is_tree=false)
Input example {
"id": "49f7dd90-27da-4921-bbf6-ce260551c123",
"name": "ql_test_building6",
"description": "ql_test_building",
"pid": "bd6fdf34-f625-4c80-92d6-d7f87d33385a",
"attributes": [
{"unit": null,"action":2,"value":3,"id":"951f29d2-dee7-11e6-b322-005056000197"},
{"unit": null,"action":1,"value":3,"id":"3e1ac56a-dee7-11e6-b321-005056000197"},
{"unit": null,"action":1,"value":1,"id":"e5cfd81c-b04e-11e6-adc5-005056000159"}
]
}
Output
Output example {
"code": "1",
"data": {
"type_id": null,
"level_id": 5,
"name": "ql_test_building4",
"pid": 175,
"id": null,
"uuid": "49f7dd90-27da-4921-bbf6-ce260551c612"
}
}

3.3.3. Create or modify multi locations


Method Post
URL http://{{test}}/rest/locations/multi
Description Create or modify multiple locations with attribute. If the location uuid exists in system,
we will modify the location information. If the location uuid does not exist in system or
not filled, we will add the location.
Input id: location uuid
name: location name
pid: location parents uuid
attributes action
attribute value
pd_id: attributes uuid. Customer can through the get attribute list get the location
attributes uuid. [Get]
http://{{test}}/rest/devices/props/value?type_id=8&is_tree=false)
Input example [
{
36 Services
"id":"49f7dd90-27da-4921-bbf6-ce260551c123",
"name":"ql_test_building6",
"description":"ql_test_building",
"pid":"bd6fdf34-f625-4c80-92d6-d7f87d33385a",
"attributes": [
{"unit": null,"action":2,"value":3,"id":"951f29d2-dee7-11e6-b322-
005056000197"},
{"unit": null,"action":1,"value":3,"id":"3e1ac56a-dee7-11e6-b321-
005056000197"},
{"unit": null,"action":1,"value":1,"id":"e5cfd81c-b04e-11e6-adc5-005056000159"}
]
}, {
"id":"49f7dd90-27da-4921-bbf6-ce260551c456",
"name":"ql_test_building5",
"description":"ql_test_building",
"pid":"bd6fdf34-f625-4c80-92d6-d7f87d33385a",
"attributes": [
{"unit": null,"action":2,"value":3,"id":"951f29d2-dee7-11e6-b322-
005056000197"},
{"unit": null,"action":1,"value":3,"id":"3e1ac56a-dee7-11e6-b321-
005056000197"},
{"unit": null,"action":1,"value":1,"id":"e5cfd81c-b04e-11e6-adc5-005056000159"}
]
}
]
Output
Output example {"code": "1",
"data": [
{
"type_id": null,
"level_id": 5,
"name": "ql_test_building6",
"pid": 175,
"id": null,
"uuid": "49f7dd90-27da-4921-bbf6-ce260551c123"
},{
"type_id": null,
"level_id": 5,
"name": "ql_test_building5",
"pid": 175,
"id": null,
"uuid": "49f7dd90-27da-4921-bbf6-ce260551c456"}
]
}

3.3.4. Delete a location


Method Delete
URL http://{{test}}/rest/locations/{{locations id}}
Description Delete a location or multi locations
Input Location uuid, if delete more than one location please put {id,id}
Input example http://{{test}}/rest/locations/0fbe14a7-9361-4c7c-a308-683cabcd1077
37 Services
Output
Output example {
"code": "1",
"message": "Success"
}

3.3.5. Get location list


Method Get
URL http://{host}/rest/locations/list
Description Get all location information
Input
Input example http://{{test}}/rest/locations/list
Output
Output example {
"path": "22-ACL Testing Area 1/22-ACL Testing Floor 1/22-ACL Test Building 1/22-ACL
Test City/All areas/Albania/World",
"type_id": "bf9ed0a8-55b9-4270-8a90-18e8bd76dd6f",
"level_id": 7,
"name": "22-ACL Testing Area 1",
"pid": 3774,
"id": 3780,
"uuid": "70c555d1-fd4a-40eb-9fa2-089ebb75f6d5"
}

3.4. Port Service


3.4.1. Create a port
Method Post
URL http://{host}/rest/devices
Description Create a device with ports
Input name
model_id (device model id)
port id
port type_id
port type
port name
port index
Notes: Customer need fill the port id and type_id, other port information not required.
Input example {
"name":"0614test with port12345",
"model_id":"{{model id}}",
"ports": [
{
"id": "2dbe3ea0-7f8a-6746-5390-063aea48d405",
"type_id": "deca7a20-0bdd-11e0-8610-00241d120212",
"type": "network port",
"device_id": "",
"name": "port 26",
38 Services
"description":"",
"port_index":"22"}
]
}
Output device name
device id
device type_id
Output example {
"code": "1",
"data": {
"dtype_id": "9f8e15a4-978d-11e2-8c01-005056000016",
"type_id": null,
"name": "0614test with port12345",
"model": null,
"id": "9e28c23c-05c7-487a-bffa-03ce7ecc6672",
"type": null
}
}

3.5. Cable Service


3.5.1. Create or modify a cable
Notes: If the user wants to connect the rear ports, duplex ports, breaker or MTP ports, and uses get
port, the API will only return a port uuid. So, we use the port tag.

• F indicates front ports


• R indicates rear ports
• A indicates Socket A
• B indicates Socket B
• 1,2,3 indicates breaker one, two, three phases
• We only support MTP connect with MTP ports, connect MTP ports tag should be null
Method Post
URL http://{host}/rest/cable
Description Create a cable. F (front does not need), R (back side port), A, B, 1-16, when not null
need chose
Input sport_id: source device port uuid
dport_id: consumer device port uuid
type_id: cable type uuid. Customer can through the get cable type API get the type id.
([Get] http://{{test}}/rest/cable/cable_type)
length
description
sdevice_id: source device uuid. Customer can through the get device port API get the
device port id. ([Get] http://{{test}}/rest/cable/device_port/device id)
ddevice_id: consumer device uuid
name: cable name
id: cable uuid
sn: cable serial number
Input example [{
39 Services
"sport_id":"d0d6c8ab-0d31-5f1f-9c68-8c432f5f5774",
"sport_tag": null,
"dport_id":"34714dc8-1569-57f3-a44a-f996f06ff46f",
"type_id":"810801d6-1771-11e2-835a-00241d120212",
"length":"1",
"description": "Candice test api1",
"dport_tag": null,
"sdevice_id":"d02322be-efc9-45ff-9ad3-017e65f37fe0",
"length_unit": "m",
"ddevice_id":"696f4ca2-170d-4435-bfc2-1b8179d8e174",
"name": "test api",
"id":"66a377b0-3636-11e7-a20b-005056000193",
"sn":"201705250957"
}]
Output
Output example {
"code": "1",
"data": [
{
"sport_id": "d0d6c8ab-0d31-5f1f-9c68-8c432f5f5774",
"sport_name": "ni 2",
"sport_tag": null,
"type_name": "Network Cable",
"dport_id": "34714dc8-1569-57f3-a44a-f996f06ff46f",
"color": "#FF000000",
"type_id": "810801d6-1771-11e2-835a-00241d120212",
"usage": null,
"length": "1.0",
"dport_tag": null,
"dport_name": "ni 1",
"sdevice_id": "d02322be-efc9-45ff-9ad3-017e65f37fe0",
"sid": 163235,
"ddevice_id": "696f4ca2-170d-4435-bfc2-1b8179d8e174",
"sdevice_name": "0104-switch",
"base_type": "n",
"name": "test api",
"ddevice_name": "0104-server",
"id": "66a377b0-3636-11e7-a20b-005056000193",
"sn": "201705250957",
"status": null}
]
}

3.5.2. Delete a cable


Method Delete
URL http://{host}/rest/cable/{id}
Description Delete a cable
Input Cable uuid
Input example http://{{test}}/rest/cable/d02322be-efc9-45ff-9ad3-017e65f37fe0
Output message
Output example {
40 Services
"code": "1",
"message": "Success"
}

3.5.3. Get cable type


Method Get
URL http://{{host}}/rest/cable/cable_type
Description Create a cable
Input
Input example http://{{test}}/rest/cable/cable_type
Output
Output example {
"name": "Fiber Cable",
"pid": null,
"id": "04217f2e-33ca-11e2-b41c-00241d120212",
"type": "f"
}

3.6. System Service


3.6.1. Get category
Method Get
URL http://{host}/rest/devices/mtpvg
Description Get Category
Input
Input example http://{host}/rest/devices/mtpvg
Output
Output example {
"code": "1",
"data": {
"template": [
{
"name": "Model",
"id": 1
},{
"name": "Type",
"id": 2
}, {
"name": "Pline",
"id": 3
}, {
"name": "Vendor",
"id": 4
}, {
"name": "Device Group",
"id": 5}
],
"device": [
{
"name": "Location",
"id": 6

41 Services
}, {
"name": "User Group",
"id": 7}]
}
}

3.6.2. Get category list


Method get
URL http://{host}/rest/devices/mtpvg/{mtpvg id}?page_idx=1&page_size=10
Description Get Category list
Input mtpvg id
Input example http://{{test}}/rest/devices/mtpvg/1?page_idx=1&page_size=10
Output
Output example {
"dcount": 0,
"type_name": "Model",
"name": "000Test",
"id": "cac71a26-49cd-11e7-bbd8-005056000197",
"type": 1,
"sid": 23544
}

3.6.3. Get attribute list


Method Get
URL http://{{test}}/rest/devices/props/value?type_id={type id}
Description Get the static attributes list
Input type_id: Attribute classification id: -1 model, 1 device, 2 port, 4 cable, 8 location
Input example http://{{test}}/rest/devices/props/value?type_id=1
Output
Output example {
"is_enum": "false",
"value_type_id": 2,
"pname": "Common",
"pid": "7e38d70e-66b8-11de-9c3b-000d566af2f2",
"dr_visable": false,
"is_script": "false",
"remove": "false",
"unit": null,
"is_need": false,
"read_only": "false",
"inherit": "false",
"name": "Department ID",
"action": "default",
"by_system": "true",
"id": "37bcabba-4b16-11e3-8155-005056000011",
"value": null,
"reback": "false"
}

42 Services
3.6.4. Query attribute
Method Get
URL http://{{test}}/rest/mtemplates/attributes/list?name={attribute name}
Description Get the filled attributeinformation
Input attribute name
Input example http://{{test}}/rest/mtemplates/attributes/list?name=name
Output
Output example {
"code": "1",
"data": {
"count": 1,
"list": [
{
"ma_id": "cd1ef7ea-69bc-11e1-ade3-00241d120212",
"ma_name": "Name"}]
}
}

3.6.5. Get rack capacity


Method Get
URL http://{{test}}/rest/devices/rcapacity/{{rack id}}
Description Get the Rack Capacity
Input rack uuid
Input example http://{{test}}/rest/devices/rcapacity/7d019500-d9af-4081-8ee4-94d439eac2a8
Output
Output example {
"code": "1",
"data": {
"weight":
[{
"used2": null,
"util": "9.4",
"reserved": 0,
"capacity2": null,
"available2": null,
"util2": null,
"available": 1205.41,
"reserved2": null,
"label": "Weight (kg)",
"used": 124.59,
"capacity": 1330}]
}
}

3.6.6. Assign device group


Method Post
URL http://host-server/rest/sys/ugdg/{type}/{ugdg_id}
43 Services
Description Assign device group to user group
Input host-server url,
type :1 assign device group to user group
2 assign user group to device group
ugdg_id: Device group id(type=1) or User group id (type=2)
access_v: True assign authority else remove authority
access_c: True assign authority else remove authority
access_m: True assign authority else remove authority
access_a: True assign authority else remove authority
Input example http://{{test}}/rest/sys/components?id=1&type=1
Output
Output example {
"code": "1",
"message": "Success"
}

3.6.7. Assign users


Method Post
URL http://seever-host/rest/sys/ugu/{type}/{ugu_id}
Description Assign user to user group
Input host-server url,
type: 1 assign user to user group, 2 assign user group to user
ugu_id: User id(type=1) OR User Group id (type =2)
id: User id(type=2) or User group id (type=1)
action: 1Assign, 2 Remove
Input example [{
"id": 1003006,
"action": 1
}]
Output
Output example {
"code": "1",
"data": {
"path": "images/audit/client_1.0.0.db.zip",
"code": 1,
"size": 25622432,
"md5": "c7ab207d13702dde5c74c8d7dd991f79"}
}

3.6.8. Delete company


Method Delete
URL http://host-server/rest/sys/companys/{id}
Description Delete company. This will delete all departments which belong to the company at
same time
Input host-server url,
id: Company id, multi pattern(id,id) (Through http://host-
server/rest/sys/companys/list)
Input example http://{{test}}/rest/sys/companys/1002988
Output
Output example {
44 Services
"code": "1",
"data": [{
"zip": null,
"addr2": null,
"city": null,
"phone": null,
"name": "0724 Test Company api",
"description": null,
"state": null,
"id": 1002999,
"fax": null, "email": null
}]
}

3.6.9. Delete department


Method Delete
URL http://host-server/rest/sys/departments/{id}
Description Delete department
Input id: Department id, multi pattern(id,id) (Through
http://{{test}}/rest/sys/departments/list
Input example http://{{test}}/rest/sys/departments/1003000
Output
Output example {
"code": "1",
"message": "Success"
}

3.6.10. Delete device group


Method Delete
URL http://host-server/rest/sys/dgroups/list?id=
Description Delete device Group. Cannot delete system device group.
Input host-server url,
id: Device group id, multi pattern (id,id)
Input example http://{{test}}/rest/sys/dgroups/145
Output
Output example {
"code": "1",
"message": "Success"
}

3.6.11. Delete user group


Method Post
URL http://host-server/rest/sys/ugroups/{id}
Description Delete User Group. Cannot delete system user group
Input host-server url,
id: User group id, multi pattern(id,id)
Input example http://{{test}}/rest/sys/ugroups/1003001

45 Services
Output
Output example {
"code": "1",
"message": "Success"
}

3.6.12. Get company list


Method Get
URL http://host-server/rest/sys/companys/list
Description Get Company list
Input host-server url
Input example http://{{test}}/rest/sys/companys/list
Output
Output example {
"code": "1",
"data": [{
"zip": null,
"addr2": null,
"city": null,
"phone": null,
"name": "0724 Test Company api",
"description": null,
"state": null,
"id": 1002999,
"fax": null,
"email": null}]
}

3.6.13. Get department list


Method Get
URL http://host-server/rest/sys/departments/list?company_id=
Description Get Department list
Input host-server url,
company_id: Company id, if not null get department list under the company
Input example http://host-server/rest/sys/departments/list
Output
Output example {
"code": "1",
"data": {
"company_id": 1002999,
"cp_email": null,
"company_name": "0724 Test Company api",
"cp_name": null,
"name": "0724 test department",
"cp_phone": null,
"description": null,
"id": 1003000,
"cp_fax": null}

46 Services
}

3.6.14. Get device group ACL


Method Get
URL http://sever-host/rest/sys/dgroups/acl?id=&type=&wu=
Description Get device group authority detail.
Input host-server url,
id: User id(type=1) or User group id(type=2)
type 1 User|2 User group
wu: True result filter with current user else not
Input example http://{{test}}/rest/sys/dgroups/acl?id=1&type=2&wu=false
Output
Output example [{
"access_v": false,
"access_d": false,
"access_c": false,
"name": "0000",
"access_a": true,
"id": "00dedb72-0fb7-11e7-a44e-005056000197",
"access_m": false,
"sid": 156
}]

3.6.15. Get device group list


Method Post
URL http://host-server/rest/sys/dgroups/list?id=
Description Get device group list with authority
1. If the id is null, get device group list which current user has authority
2. If id not null, get device group list which the specified user has authority
3. If want to get all device group without filter, make sure the id =1
Input host-server url,
id: User id (Through http://{{test}}/rest/sys/users/list)
Input example {
"name": "0617 Device Group",
"by_system": true,
"sid": 145
}
Output
Output example {
"code": "1",
"data": {
"name": "0724 Device Group",
"description": null,
"by_system": false,
"id": "55662e1a-6c65-11e7-87aa-6b20961a7d3b",
"sid": 145}
}

47 Services
3.6.16. Get probe list
Method Get
URL http://sever-host/rest/sys/probes
Description Get the probe list in the system
Input host-server url
Input example http://{{test}}/rest/sys/probes
Output
Output example [{
"status_id": 1,
"status_name": "Running",
"name": "SP10.10.10.197",
"id": "40f8c6c4-cb14-11e6-9fec-005056000197"}]

3.6.17. Get unit define


Method Get
URL http://sever-host/rest/sys/unit?ma_id=
Description Get unit define in the system
Input host-server url,
ma_id: Attribute uuid|MA uuid
When ma_id is null, get all unit.
When ma_id is uuid, get ma or attribute unit.
When ma_id is numeric, get a special unit.
Input example http://{{test}}/rest/sys/unit?ma_id=b86e441e-872d-11de-ba55-000d566af2f2
Output
Output example [
{
"symbol": "°F",
"a": 9,
"b": 5,
"c": 32,
"base_id": 1049,
"name": "Fahrenheit",
"id": 1048
},{
"symbol": "°C",
"a": 1,
"b": 1,
"c": 0,
"base_id": 1049,
"name": "Celsius",
"id": 1049
}
]

3.6.18. Get user ACL


Method Get
URL http://sever-host/rest/sys/users/acl?ug_id=&wu=
48 Services
Description Get User list under the specified user group
Input host-server url,
ug_id: User Group id
wu: True result filter with current user else not
Input example http://{{test}}/rest/sys/users/acl?ug_id=4&wu=true
Output
Output example [
{
"name": "bill3",
"id": 1003053
}
]

3.6.19. Get user group list


Method Post
URL http://host-server/rest/sys/ugroups/list?id=
Description Get User Group list
Input host-server url, id: User id
1. If the id is null, get device group list which current user has authority
2. If id not null, get device group list which the specified user has authority
3. If want to get all device group without filter, make sure the id =1
Input example http://{{test}}/rest/sys/ugroups/list?id=1
Output
Output example {
"code": "1",
"data": [
{
"name": "lori-DG1",
"description": null,
"by_system": false,
"id": "b1d7eb3e-66d9-11e7-a82e-c32e69417c0b",
"sid": 143}
]
}

3.6.20. Get user list


Method Get
URL http://sever-host/rest/sys/users/list?id=&ug_id=
Description Get User list with authority
1. If the id is null, get user list which has same authority with current user
2. If the id not null, get user list which has same authority with the specified
user
3. If want to get all user without authority, make sure the id =1
Input host-server url,
id: User id
ug_id: User group id. Get all user not under the specified user group
Input example http://{{test}}/rest/sys/users/list?
Output

49 Services
Output example [{
"company_id": -1,
"department_id": -1,
"department_name": null,
"company_name": null,
"name": "bill3",
"last_name": "",
"phone_num": "123456789111",
"id": 1003053,
"first_name": "",
"email": "[email protected]"
}]

3.6.21. Save company


Method Post
URL http://host-server/rest/sys/companys
Description Create or modify company
Input host-server url,
name: Company name
id: Company id
description: Company description
addr: The first street address that the company belongs
addr2: The second street address that the company belongs
city: The city that the company belongs
zip: The zip code of the company
phone: The phone of the company
fax: The fax of the company
email: The email of the company
Input example {
"name":"0724 Test Company api"
}
Output
Output example {
"code": "1",
"data": {
"zip": null,
"addr2": null,
"city": null,
"phone": null,
"name": "0724 Test Company api",
"description": null,
"state": null,
"id": 1002999,
"fax": null,
"email": null
}
}

50 Services
3.6.22. Save department
Method Post
URL http://host-server/rest/sys/departments
Description Create or modify department
Input host-server url,
name: Department name
company_id: Company id. (Through http://host-server/rest/sys/companys/list)
description: Department description
cp_name: Contact name
cp_phone: Contact phone number
cp_fax: Contact fax number
cp_email: Contact email
Input example {
"name":"0724 test department",
"company_id":"1002999"
}
Output
Output example {
"code": "1",
"data": {
"company_id": 1002999,
"cp_email": null,
"company_name": "0724 Test Company api",
"cp_name": null,
"name": "0724 test department",
"cp_phone": null,
"description": null,
"id": 1003000,
"cp_fax": null}
}

3.6.23. Save device group


Method Post
URL http://host-server/rest/sys/dgroups
Description Create or modify device group
Input host-server url,
name: Device Group name
sid: Device group id
description: Device group description
Input example {
"name":"0617 Device Group",
"by_system": true,
"sid": 145
}
Output
Output example {
"code": "1",
"data": {
"name": "0724 Device Group",

51 Services
"description": null,
"by_system": false,
"id": "55662e1a-6c65-11e7-87aa-6b20961a7d3b",
"sid": 145}
}

3.6.24. Save user group


Method Post
URL http://host-server/rest/sys/ugroups
Description Create or modify user group
Input host-server url,
name: User Group name
id: User group id
description: User group description
Input example {
"name": "Test User Group 0724"
}
Output
Output example {
"code": "1",
"data": {
"name": "Test User Group 0724",
"description": null,
"by_system": false,
"id": 1003001}
}

3.6.25. Save user


Method Post
URL http://host-serever/rest/sys/users
Description Create or modify user
Input host-server url,
name: Favorite name
password: User password
old_password: User password, user change password use. If operator is admin, not
need.
id: User id
first-name: User first name
middle_name
Input example http://{{test}}/rest/sys/user_favorite?type=1&njson=true&clazz=&page_idx=&page_si
ze=
Output
Output example {
"code": "1",
"data": {
"count": 0,
"list": []
}

52 Services
}

3.6.26. Get Enc&Blade Relation


Method Get
URL http://host-server/rest/floorplan/shape/{model_id}
Description Get enclosure and blade relation ship
Input host-server url,
model_id: Device model uuid
Input example http://{{test}}/rest/floorplan/mslots/39b3580a-a4f9-11e3-9522-005056000016
Output
Output example {
"code": "1",
"data": {
"slots_group": {
"1": {
"lty": 0.00366913809082484,
"ltx": 0.0176807228915663,
"slot_columns": 8,
"depth": 0.001,
"slot_rows": 2,
"rby": 0.369748841519926,
"face_id": 1,
"rbx": 0.425465708989805,
"slots_ids": [
1,
2],
"slot_groups": 1}
}
}
}

3.6.27. Get location shape


Method Get
URL http://host-server/rest/floorplan/shape/{loc-id}
Description Get Location (floor or area) shape
Input host-server url,
loc_id: Floor id (Can through get location list get the id)
Input example http://{{test}}/rest/floorplan/rdetail/7aeaf247-848a-414d-a8a0-84de428383cd
Output
Output example {
"code": "1",
"data": {
"side": null,
"level": 6,
"wall_points": {
"1": {
"idx": 1,
"px": -11.096244,

53 Services
"py": 7.146035999999999}
}
}
}

3.6.28. Get device position


Method Get
URL http://host-server/rest/floorplan/devices/{loc_id}?load_children=&h5=
Description Get Location (floor or area) shape
Input host-server url,
loc_id: Floor id
load_children: True return "Sensor" else not
h5: True all device position reference point is location, else refer to their parent (for
example: rack refer to location, device mount on the rack refer to Rack.
Input example http://{{test}}/rest/floorplan/devices/162?load_children=true&h5=true
Output
Output example {
"code": "1",
"data": {
"models": {
"3659": {
"name": "Cross Junction",
"psid": 1966,
"id": "77353e4e-7cc5-11e2-b3f6-00241d120212",
"tsid": 1145,
"sid": 3659,
"attrs": {
"depth": "2.0660000000000000",
"color": "16041478",
"width": "2.0660000000000000",
"swidth": 0.48341,
"sdepth": 0.8535,
"height": "0.10700000000000000000",
"m3d": "images/system/model/1004/77353e4e-7cc5-11e2-b3f6-
00241d120212_65953.xaml",
"sheight": 0.04445}
}
}
}
}

3.6.29. Get rack shape


Method Get
URL http://host-server/rest/floorplan/rdetail/{rack_id}?port=
Description Get rack shape, include the device shape mounted on the rack
Input host-server url,
rack_id: Device uuid
port: True return device port position info, else not.

54 Services
Input example http://{{test}}/rest/floorplan/rdetail/7aeaf247-848a-414d-a8a0-84de428383cd
Output
Output example {
"code": "1",
"data": {
"models": {
"2225": {
"name": "PM2004H-401",
"psid": 1568,
"id": "7025b6d2-44e9-11de-be12-000d566af2f2",
"tsid": 609,
"sid": 2225,
"attrs": {
"depth": "0.20990000000000000000",
"color": "4605580",
"micon": "images/system/model/223/7025b6d2-44e9-11de-be12-
000d566af2f2_49621.png",
"width": "0.43150000000000000000",
"icon": "images/system/model/223/7025b6d2-44e9-11de-be12-
000d566af2f2_31674.png",
"swidth": 0.48341,
"sdepth": 0.8535,
"height": "0.04360000000000000000",
"sheight": 0.04445}
}
}
}
}

3.6.30. Get location Acl


Method Get
URL http://host-server/rest/locations/acl?id=&typs=&wu=
Description Get location authority detail
Input host-server url,
id: User id(type=1) or User group id (type=2)
type:1 User| 2 User group
wu: True result filter with current user else not
Input example http://{{test}}/rest/floorplan/rdetail/7aeaf247-848a-414d-a8a0-84de428383cd
Output
Output example {
"control": 1,
"access_d": false,
"type_id": "0c9400e7-bdf7-434b-935a-c57938db2ac4",
"access_c": false,
"level_id": 6,
"access_a": false,
"pid": 160,
"uuid": "f67d8198-d600-47ef-967d-d173ef4f6491",
"access_v": false,
"children": [
{
55 Services
"access_v": false,
"control": 1,
"access_d": false,
"type_id": "bf9ed0a8-55b9-4270-8a90-18e8bd76dd6f",
"access_c": false,
"level_id": 7,
"name": "A1",
"access_a": false,
"pid": 2678,
"id": 2680,
"access_m": false,
"uuid": "4b0af174-5ec2-42c1-91e3-14758355b6ec"}
],
"name": "floor0321",
"id": 2678,
"idx": 2,
"access_m": false
}

3.6.31. Get rack detail


Method Get
URL http://host-server/rest/floorplan/plan{rack_id}?port=
Description Assign location to user group
Input host-server url,
ug_id: User group id (Through http://{{test}}/rest/devices/mtpvg/7 get the id)
id: Location id
access_v: True assign authority else remove authority
access_c: True assign authority else remove authority
access_m: True assign authority else remove authority
access_d: True assign authority else remove authority
access_a: True assign authority else remove authority
children: Location children node
Input example [{
"ug_id":"1002982",
"id":"264",
"access_v": false,
"access_c": false,
"access_m": false,
"access_d": false,
"access_a": false
}]
Output
Output example {
"code": "1",
"message": "Success"
}

56 Services
3.6.32. Get device list
Method Get
URL http://host-server/rest/devices/rdinfo/{rack_id}
Description Get device info under the rack
Input host-server url,
rack_id: Device uuid
Input example http://{{test}}/rest/devices/rdinfo/deb6557e-9bfe-4b15-a0ed-dfe86d7fd1b4
Output
Output example {
"code": "1",
"data": [{
"owner": null,
"side": null,
"enclourse": null,
"pname": "9PX UPS",
"ip": "10.10.10.226",
"description": "Eaton 9PX 5000",
"mid": "c27aa851-bc41-5727-98ce-310ebab5e2af",
"tname": "UPS - Rackmount",
"upos": 35,
"mname": "9PX5K",
"tsid": 610,
"tid": "59f77ec6-cd7b-11dd-9002-001d091dd9dd",
"sid": 691,
"is_reserved": false,
"msid": 23172,
"slots": null,
"vname": "Eaton",
"name": "eUPS - ACD-9PX5K",
"id": "35ec2bb6-c05d-34ef-87e7-b78781a80f1a"}]
}

3.6.33. Export device events


Method Get
URL http://host-
server/rest/devices/revents/{rack_id}?page_idx=&page_size=&start=&end=
Description Get device self and children devices event
Input host-server url,
rack_id: Device uuid
start: Start time,unit s(end -365*24*3600(past one year))end: End time, unit s (Get
through time.time())
page_idx: Page index
page_size: Page size
Input example http://{{test}}/rest/devices/rdinfo/deb6557e-9bfe-4b15-a0ed-dfe86d7fd1b4
Output
Output example Get the PDF file

57 Services
3.6.34. Get alarm info
Method Post
URL http://server-host/rest/mtemplates/alarms/info2
Description Get the alarm information with the query parameter
Input host-server url,
node_id: Device uuid or location id
with_children: Device use
name: Device name
targets:6 Device, 7 Location, 8 Rack Group, Multi Pattern (6,7,8)
level_id: Alarm level: 0 Exception, 1 Normal, 2 Warning, 3 Unreachable, 4 Critical
page_idx: page index
page_size: Page size
Input example {
"level_id": 2,
"page_idx": 1,
"page_size": 100
}
Output
Output example {
"code": "1",
"data": {
"count": 3,
"list": [
{
"level_id": 3,
"link": true,
"description": null,
"mid": "1cc2c4b6-0139-5edd-a646-7d720c39f6a4",
"_is_child_": true,
"type": 6,
"tid": "59f63ab6-cd7b-11dd-9daf-001d091dd9dd",
"sid": 1622,
"vid": "6b16df98-cd81-11dd-82c0-001d091dd9dd",
"children": [
{
"severity": {
"label": "Unreachable",
"colors": [{
"color": "#249CED",
"id": 3,
"label": "Unreachable"
}],
"is_child": true
},
"is_trigger": false,
"comments": false,
"device_id": "b52a1475-d073-4b93-979a-7db1b5d96ec0",
"pname": "122pj rpdu(7)",
"_ack": "No",
"level_id": 3,
"clear": false,
"triggers_detail": null,
58 Services
"triggers": "Input Current % Load",
"click": false,
"current_value": "Input Current % Load: Can't get value by OID:
.1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1",
"device_sid": 1622,
"disable": false,
"last_time": "2021-05-11 10:02:17 CST",
"is_ack": false,
"id": "c556d3a2-62d2-11e6-be14-005056000054",
"detail": null
},
{
"severity": {
"label": "Unreachable",
"colors": [{
"color": "#249CED",
"id": 3,
"label": "Unreachable"
}],
"is_child": true
},
"is_trigger": false,
"comments": false,
"device_id": "b52a1475-d073-4b93-979a-7db1b5d96ec0",
"pname": "122pj rpdu(7)",
"_ack": "No",
"level_id": 3,
"clear": false,
"triggers_detail": null,
"triggers": "Input Current Crest Factor",
"click": false,
"current_value": "Input Current Crest Factor: Can't get value by OID:
.1.3.6.1.4.1.534.6.6.7.3.3.1.10.0.1",
"device_sid": 1622,
"disable": false,
"last_time": "2021-05-11 10:02:17 CST",
"is_ack": false,
"id": "2c9830de-62d2-11e6-be13-005056000054",
"detail": null
},
{
"severity": {
"label": "Unreachable",
"colors": [{
"color": "#249CED",
"id": 3,
"label": "Unreachable"
}],
"is_child": true
},
"is_trigger": false,
"comments": false,
"device_id": "b52a1475-d073-4b93-979a-7db1b5d96ec0",

59 Services
"pname": "122pj rpdu(7)",
"_ack": "No",
"level_id": 3,
"clear": false,
"triggers_detail": null,
"triggers": "Input Phase Name",
"click": false,
"current_value": "Input Phase Name: Can't get value by OID:
.1.3.6.1.4.1.534.6.6.7.3.3.1.2.0.1",
"device_sid": 1622,
"disable": false,
"last_time": "2021-05-11 10:02:17 CST",
"is_ack": false,
"id": "08eaf11a-6450-11e6-9edc-005056000054",
"detail": null
}
],
"last_time": "2021-05-11 10:02:17 CST",
"is_ack": false,
"id": "b52a1475-d073-4b93-979a-7db1b5d96ec0",
"severity": {
"label": "Unreachable",
"colors": [
{
"color": "#249CED",
"id": 3,
"label": "Unreachable"}
],
"is_child": false
},
"comments": false,
"_ack": "No",
"clear": true,
"loc_id": -1,
"triggers": 4,
"click": true,
"loc_uuid": null,
"disable": false,
"name": "122pj rpdu(7)",
"location": null,
"_pid_": "6b16df98-cd81-11dd-82c0-001d091dd9dd"
},
{
"level_id": 3,
"link": true,
"description": null,
"mid": "07bb6a39-a3d9-5050-a047-8092aeee83fa",
"_is_child": true,
"type": 6,
"tid": "59f77ec6-cd7b-11dd-9002-001d091dd9dd",
"sid": 1601,
"vid": "6b16df98-cd81-11dd-82c0-001d091dd9dd",
"children": [

60 Services
{
"severity": {
"label": "Unreachable",
"colors": [
{
"color": "#249CED",
"id": 3,
"label": "Unreachable"}
],
"is_child": true
},
"is_trigger": false,
"comments": false,
"device_id": "70c9006a-4203-4693-9512-9e07a728d6c5",
"pname": "122pj rups",
"_ack": "No",
"level_id": 3,
"clear": false,
"triggers_detail": null,
"triggers": "Battery Current",
"click": false,
"current_value": "Battery Current: Failed to get value from
oid:.1.3.6.1.2.1.33.1.2.6.0",
"device_sid": 1601,
"disable": false,
"last_time": "2021-05-11 10:02:52 CST",
"is_ack": false,
"id": "f555d30a-430c-11e0-91d8-00241d120212",
"detail": null}
]
},
"message": "Success"
]
}
}

3.7. Audit Service


3.7.1. Cancel audit
Method Put
URL http://server-host/rest/devices/audit/cancel/{id}
Description Change audit status to cancel and only "In Progress" (Status_is =2) can be cancel.
Input host-server url,
id: Audit uuid, multi pattern (id,id)
Input example http://host-server/rest/devices/audit/cancel/71996c98-c69a-e4a5-d1d4-
7a059068c0df
Output
Output example {
"code": "1",
"message": "Success"

61 Services
}

3.7.2. Delete audit


Method Delete
URL http://server-host/rest/devices/audit/{id}
Description Delete Audit
Input host-server url,
id: Audit uuid, multi pattern(id,id)
Input example http://host-server/rest/devices/audit/cancel/71996c98-c69a-e4a5-d1d4-
7a059068c0df
Output
Output example {
"code": "1",
"message": "Success"
}

3.7.3. Export audit detail


Method Get
URL http://server-host/rest/mobile/audit_detail/export?audit_id=&print=
Description Export Audit Detail
Input host-server url,
audit_id: Audit id
print: True pdf, false xlsx
Input example http://host-server/rest/mobile/audit_detail/export?audit_id=9c2a12f7-ba46-c6b9-
7865- cfd6f13f7047&print=true
Output
Output example Get the PDF file

3.7.4. Export audit list


Method Get
URL http://server-
host/rest/devices/audit/export?id=&name=&status_id=&creator=&print=
Description Export Audit List
Input host-server url,
id: Audit uuid to filter
name: Audit name to filter
status_id: Audit status id.
Print: True pdf, false xlsx
Input example http://{{test}}/rest/devices/audit/export?id=&name=&sttatus_id=&creator=&print=tr
ue
Output
Output example Get the PDF file

62 Services
3.7.5. Get audit list
Method Post
URL http://{{test}}/rest/devices/audit/list?
Description Get Audit list
Input host-server url,
id: Audit uuid to filter
name: Audit name to filter
status_id: Audit status id. 1.Not Started 2. In progress 3. Completed 4. Canceled
creator: User ID
racks: Whether return racks of the audit
page_idx: Page Index
page_size: Page size
Input example {
"page_idx": 1,
"page_size": 1,
"name": "test"
}
Output
Output example {
"code": "1",
"data": {
"count": 2,
"list": [{
"completion": "0.0%",
"creator": "16",
"verified_racks": 0,
"status_name": "In Progress",
"status_color": "0xffff66",
"description": null,
"status_id": 2,
"name": "0518 Rack 3",
"completion_date": null,
"id": "ecb8c8ba-14f4-96ee-0acc-2d9938e5a799",
"create_date": "2017-10-18 11:46:06 CST",
"start_date": "2017-10-17 15:44:19 CST",
"total_racks": 3}]
}
}

3.7.6. Get audit list(G)


Method Get
URL http://{{test}}/rest/devices/audit/list?
Description Get Audit List(G)
Input host-server url,
id: Audit uuid to filter
name: Audit name to filter
status_id: Audit status id. 1.Not Started 2. In progress 3. Completed 4. Canceled
creator: User ID
racks: Whether return racks of the audit

63 Services
page_idx: Page Index
page_size: Page size
Input example http://{{test}}/rest/devices/audit/list?id=2
Output
Output example {
"code": "1",
"data": {
"count": 2,
"list": [{
"completion": "0.0%",
"creator": "16",
"verified_racks": 0,
"status_name": "In Progress",
"status_color": "0xffff66",
"description": null,
"status_id": 2,
"name": "0518 Rack 3",
"completion_date": null,
"id": "ecb8c8ba-14f4-96ee-0acc-2d9938e5a799",
"create_date": "2017-10-18 11:46:06 CST",
"start_date": "2017-10-17 15:44:19 CST",
"total_racks": 3}]
}
}

3.7.7. Get audit racks


Method Get
URL http://server-host/rest/devices/audit/map/{audit_id}
Description Get Audit mapped racks
Input host-server url,
audit_id: Audit uuid
Input example http://{{test}}/rest/devices/audit/map/71996c98-c69a-e4a5-d1d4-7a059068c0df
Output
Output example {
"code": "1",
"data": [{
"name": "0518Rack",
"id": 90,
"uuid": "fd837619-be3d-46bb-8724-eadf07d6cf15"
},{
"name": "0518Rack(1)",
"id": 28,
"uuid": "142ff8f8-197a-46fe-aa27-ec6818928f39"}]
}

3.7.8. Save audit map


Method Post
URL http://server-host/rest/devices/audit/map/{audit_id}

64 Services
Description Map audit and racks. Same rack cannot map to different audit.
Input host-server url,
audit_id: Audit uuid
id: Device uuid
action: 1 save |2 delete
Input example [{
"id":"fbd6bbf7-7830-4561-8c89-c11888e1175d",
"action":1
}]
Output
Output example {
"code": "1",
"message": "Success"
}

3.7.9. Recreate data base


Method Get
URL http://server-host/rest/mobile/version
Description Recreate data base with delay
Input host-server url,
time: Recreate data base delay time, unit ms.
Input example http://{{test}}/rest/mobile/update?time=
Output
Output example {
"code": "1",
"message": "Success"
}

3.7.10. Save audit


Method Post
URL http://server-host/rest/devices/audit/map/{audit_id}
Description Create or modify audit
Input host-server url,
id: Audit uuid
name: Audit name
description: Audit description
racks: Audit and rack map. Reference to the save Audit Map
Input example {
"id": null,
"name": "Test Audit",
"description": "Test Audit",
"racks": [{
"device_id": "7d019500-d9af-4081-8ee4-94d439eac2a8",
"action": 1
},{
"device_id": "8cf93b0f-be97-42b4-88e8-6ad90e909f0b",
"action": 2}]
}

65 Services
Output
Output example {
"code": "1",
"data": {
"completion": "0.0%",
"creator": "12",
"verified_racks": 0,
"status_name": "Not Started",
"status_color": "0xfac090",
"description": "Test Audit",
"status_id": 1,
"name": "Test Audit1",
"completion_date": null,
"id": "349b6d89-0585-c9e1-7c33-79ef9eac4f8a",
"create_date": "2017-10-20 21:10:30 CST",
"start_date": null,
"total_racks": 0}
}

3.8. Monitor Service


3.8.1. Save Template Trigger
Method Post
URL http://{{host}}/rest/mtemplates/triggers/v2
Description Save monitor trigger
Input id Template trigger id. (optional)
name Template trigger name.
level_id Template trigger type id. (level_id: -1 = Template, level_id: 5 = Rack
Group, level_id: 6 = Device, level_id: 7 = Location)
target_id type_id=-1 Template id | type_id=6 Device id | type_id=7 Location id |
type_id=8 Rack group id
description Template trigger description.
level Template trigger level. (trigger_id: 3 = Critical, trigger_id: 2 = Warning,
trigger_id: 9 = Minor, trigger_id: 8 = Information),
msg_tid Template trigger message format. (optional)
device_id Device uuid. (optional)
mt_on Min time on (unit s). (optional)
mt_off Min time off (unit s). (optional)
express Template resource expression.
key_type 2 Static attribute else template resource.
key Attribute id ( key_type=2 ) or template resource id ( key_type=-1 )
action Action like "percent".
unit Attribute or template resource unit.
percent_key_type 2 Static attribute else template resource. (optional)
percent_key Attribute id (key_type=2) or template resource id (key_type=-1).
(optional)
percent_comparision Action like "BETWEEN". (optional)
v1 Compare value.
v2 Compare value. (optional)

66 Services
recovery_express Template resource recovery expression & message. (optional)
express Template resource recovery expression, Same with express.
message Template resource recovery message.
flags 1 only update status else update all info. (optional)
from_recourse True from resource else from template.
Input example {
"id":"246601fc-1c93-11ee-b67c-0fc14600cc67",
"name":"Test",
"level":3,
"mt_on":null,
"mt_off":null,
"express":[
[
{
"action":"=",
"key":"fb83a6c3-b2ed-4b7a-8052-afe7daec1fdd",
"v1":1,
"children":null,
"type":3,
"key_name":"Active Power",
"is_trap":3,
"unit":"W",
"percent_key":null,
"percent_comparision":null,
"index":null
}
]
],
"description":null,
"status":true,
"level_id":6,
"target_id":"b339a24c-2b17-3f18-bc38-9b89159994d6",
"r_express":null,
"msg_tid":null,
"target_name":"ePDU - U611E33000",
"recovery_express":{"express":[]},
"mid":"af817427-4753-59f5-9612-d256dd771c44",
"_is_child":true,
"from_resource":false,
"uuid":"246601fc-1c93-11ee-b67c-0fc14600cc67",
"tid":"59f63ab6-cd7b-11dd-9daf-001d091dd9dd",
"sid":"12646",
"vid":"6b16df98-cd81-11dd-82c0-001d091dd9dd",
"recovery_express_key":null,
"monitor_attribute":true,
"express_key":"\"Active Power\" > 1 W",
"device_id":null,
"resources":1,
"check":false,
"_status":"Enable",
"dynamic_name":null,
"serverity":"Critical",
"level_name":"Device",
"tm_id":"f0937536-ff72-11ed-a8f7-97f2e145f5b7",
"inherit":false,
"_pid_":"6b16df98-cd81-11dd-82c0-001d091dd9dd",
"_config":true
}
67 Services
Output result
Output example {
"code":"1",
"data":{
"mt_on":null,
"target_name":"ePDU - U611E33000",
"level_id":6,
"recovery_express":{"express":[]},
"description":null,
"mid":"af817427-4753-59f5-9612-d256dd771c44",
"express":[
[
{
"action":"=",
"key":"fb83a6c3-b2ed-4b7a-8052-afe7daec1fdd",
"v1":1,
"children":null,
"type":3,
"key_name":"Active Power",
"is_trap":3,
"unit":"W",
"percent_key":null,
"percent_comparision":null,
"index":null,
"key_type":-1,
"tabular":false,
"_unit":true
}
]
],
"_is_child":true,
"from_resource":false,
"msg_tid":null,
"uuid":"246601fc-1c93-11ee-b67c-0fc14600cc67",
"tid":"59f63ab6-cd7b-11dd-9daf-001d091dd9dd",
"_config":true,
"sid":12646,
"vid":"6b16df98-cd81-11dd-82c0-001d091dd9dd",
"mt_off":null,
"id":"246601fc-1c93-11ee-b67c-0fc14600cc67",
"recovery_express_key":null,
"r_express":null,
"monitor_attribute":true,
"express_key":"\"Active Power\" = 1 W",
"device_id":null,
"level":3,
"resources":1,
"target_id":"b339a24c-2b17-3f18-bc38-9b89159994d6",
"check":false,
"_status":"Enable",
"dynamic_name":null,
"version":2,
"serverity":"Critical",

68 Services
"level_name":"Device",
"tm_id":"f0937536-ff72-11ed-a8f7-97f2e145f5b7",
"_change_status_":false,
"inherit":false,
"name":"Test",
"_pid_":"6b16df98-cd81-11dd-82c0-001d091dd9dd",
"status":true
},
"message":"Success"
}

3.9. API Input


Before injecting data with the API input calls, the device must be configured for monitoring with the API
Input protocol. This requires a monitoring template and monitoring configuration at the device.

1. Create a Monitoring Template.


2. Add an attribute in the template where the data will be injected and set the Monitor Type to API
Input.

3. Apply the template to the device on the Applied Rules tab.


Note: The template can also be applied at the Type, Product Lines and Models levels.

69 Services
4. Select the device link to open the Device Central page for the device.
5. Select the Monitor function tile to configure the device monitoring.
6. Configuration requires that an IP address is provided. Use 127.0.0.1 or the actual IP address.
Note: The API call uses the device name or alias to identify the device so the IP address is not
actually used.
7. Select API Input for the protocol.
8. On the Monitoring Templates tab, enable the API monitoring template.
9. Click the Submit button to save the monitoring configuration.

10. Insert the API data.


Method Post
URL http://{HOSTSERVER}/rest/devices/monitor/data

70 Services
Description Insert monitor data to device
Input device_name: Device name in BLSS
device_alias: Static attribute alias of the device
attribute: Template attribute UUID
value: value of the attribute
time: timestamp of the attribute value
Rules: device_name and device_alias, one of them must be identified. The input
device_name or device_alias must be unique.
Input example [{
"device_alias":"TEST1",
"attributes": [{
"attribute":"b86e441e-872d-11de- ba55-000d566af2f2",
"value":60, "time":1516243835555,
"unit":"°F"
},{
"attribute":"763ec1fe-9a10-11de- b08e-00241d120212",
"value":6, "time":1516243835555,
"unit":"A"}
]
}]

Note: The attribute UUID can be found by opening attribute's page in Attribute Manager.

71 Services
11. Login to the BLSS system, select the device and the Dashboard function tile and check the Real-
time Monitoring Data for the device.

3.10. Company and Department API calls


This API is used to get Space, Environment, Power and Assets information based on given Company
Alias.

1. Please use Basic Auth to access this API.


NOTE: Contact support for the username and password for Basic Auth

2. It requests to input header “Accept: application/ json”

72 Services
Method Get
URL http://{host}/rest/analyze/company/analyze?customer={Company
Alias}&power=true&space=true&environmental=true&assets=true
Description Get Space, Environment, Power and Assets information based on given Company
Alias.

By default, it regards the customer you input as company alias if there is no


customer_type. If there is customer_type set, it will depend on these settings. (1:
company name | 2: company alias | 3: department name | 4: department alias)

Optional Request Parameters


• page_size: 100 (size of each page, recommended value)
• page_idx: 1 (page index, start with 1)
The token will be expired after 30 minutes.
Input
Input example http://{host}/rest/analyze/company/analyze?customer={Company
Alias}&power=true&space=true&environmental=true&assets=true

http://{host}/ranalyze/company/analyze?customer={Company Name}
&customer_type=1&power=true&space=true&environmental=true&assets=true
&page_size=100&page_idx=1
Output
Output example {
"code": "1",
"data": {
"Company": "OPI",
"Departments": [
{
"Department": {
"Space": {
"Data": [
{
"metric": "configured racks",
"value": "3"
}
]
},
"Environmental": {
"Data": [
{
"rack": "PS-PDU-01",
"sensorName": "lori-sensor",
"temperature": "90.0f",
"humidity": "78.0%",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"height": "4.1ft"

73 Services
},
{
"rack": "PS-PDU-02",
"sensorName": "lori-sensor(1)",
"temperature": "N/A",
"humidity": "N/A",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"height": "4.3ft"
},
{
"rack": "PS-PDU-03",
"sensorName": "lori-sensor(2)",
"temperature": "N/A",
"humidity": "N/A",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"height": "3.6ft"
},
{
"rack": "PS-PDU-03",
"sensorName": "lori-sensor(3)",
"temperature": "N/A",
"humidity": "N/A",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"height": "3.7ft"
},
{
"rack": "PS-PDU-03",
"sensorName": "lori-sensor(4)",
"temperature": "N/A",
"humidity": "N/A",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"height": "6.7ft"
}
],
"Count": 5
},
"Alias": null,
"Id": 13,
"Power": {
"UsableProvisioned": "72.0A",
"ConnectedProvisioned": "90.0A",
"totalAmp": "33.3A",
"UsableProvisionedkW": "8.640kW",
"BreakersProvisioned": "3",
"CircuitsProvisioned": "6",
"ConnectedProvisionedkW": "10.800kW",
"Data": [
{
"actual": "6A",
"circuit": "3",
"breaker": "PDU1-P3-B03",
"usuable": "24.0A",
"connected_device": "PS-PDU-A-04",

74 Services
"utilization": "25.0%",
"assetTag": "AT:1014001",
"remaining": "18.0A",
"voltage": "120.0V",
"connected": "30.0A",
"actualkW": "0.720kW",
"P3actualAmps": "6.0A",
"usablekW": "2.880kW",
"panel": "PDU1-P3",
"connectedkW": "3.600kW",
"P3actualkW": "2.000kW",
"pdu|rpp": "PDU-2",
"phases": "3"
},
{
"P2actualkW": "2.500kW",
"actual": "17.3A",
"circuit": "7,9,11",
"P1actualkW": "1.500kW",
"breaker": "PDU1-P1-B05",
"usuable": "24.0A",
"connected_device": "PS-PDU-B-03",
"utilization": "72.1%",
"assetTag": "AT111501",
"remaining": "6.7A",
"P2actualAmps": "6.0A",
"voltage": "120.0V",
"connected": "30.0A",
"actualkW": "2.076kW",
"P1actualAmps": "10.0A",
"P3actualAmps": "10.0A",
"usablekW": "2.880kW",
"panel": "PDU1-P1",
"connectedkW": "3.600kW",
"P3actualkW": "2.000kW",
"pdu|rpp": "PDU-2",
"phases": "1,2,3"
},
{
"P2actualkW": "2.000kW",
"actual": "10A",
"circuit": "1,3",
"P1actualkW": "1.500kW",
"breaker": "PDU1-P1-B01",
"usuable": "24.0A",
"connected_device": "PS-PDU-B-06, PS-PDU-B-05",
"utilization": "41.7%",
"assetTag": "AT0012",
"remaining": "14.0A",
"P2actualAmps": "6.0A",
"voltage": "120.0V",
"connected": "30.0A",
"actualkW": "1.200kW",

75 Services
"P1actualAmps": "10.0A",
"usablekW": "2.880kW",
"panel": "PDU1-P1",
"connectedkW": "3.600kW",
"pdu|rpp": "PDU-2",
"phases": "1,2"
}
],
"totalkW": "3.996kW"
},
"Name": "DEV"
}
}
],
"CompanyId": 12,
"Alias": "OPI Test",
"Assets": {
"Data": [
{
"productLine": "Sensor",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "3L-AP",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Sensor",
"department": "DEV",
"device": "lori-sensor",
"manufacturer": "ELSA"
},
{
"productLine": "Sensor",
"serialNumber": "SN0011",
"lifecycleStatus": "Operational",
"ipAddress": "127.0.0.1",
"model": "3L-AP",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": "AT0011",
"type": "Sensor",
"department": "DEV",
"device": "lori-sensor(1)",
"manufacturer": "ELSA"
},
{
"productLine": "Sensor",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "3L-AP",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Sensor",

76 Services
"department": "DEV",
"device": "lori-sensor(2)",
"manufacturer": "ELSA"
},
{
"productLine": "Sensor",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "3L-AP",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Sensor",
"department": "DEV",
"device": "lori-sensor(3)",
"manufacturer": "ELSA"
},
{
"productLine": "Sensor",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "3L-AP",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Sensor",
"department": "DEV",
"device": "lori-sensor(4)",
"manufacturer": "ELSA"
},
{
"productLine": "Generic - Electrical Panel",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": "10.10.10.226",
"model": "Generic 42 Circuit Panel (2 columns)",
"location": "A2, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Electrical Panel",
"department": "DEV",
"device": "PDU1-P1",
"manufacturer": "Generic"
},
{
"productLine": "Generic - Breaker",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "2-Pole Breaker",
"location": "A2, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": "AT0012",
"type": "Circuit Breaker",
"department": "DEV",

77 Services
"device": "PDU1-P1-B01",
"manufacturer": "Generic"
},
{
"productLine": "Generic - Breaker",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "3-Pole Breaker",
"location": "A2, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": "AT111501",
"type": "Circuit Breaker",
"department": "DEV",
"device": "PDU1-P1-B05",
"manufacturer": "Generic"
},
{
"productLine": "Generic - Electrical Panel",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": "10.10.10.226",
"model": "Generic 42 Circuit Panel (1 column)",
"location": "A2, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Electrical Panel",
"department": "DEV",
"device": "PDU1-P3",
"manufacturer": "Generic"
},
{
"productLine": "Generic - Breaker",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "1-Pole Breaker",
"location": "A2, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": "AT:1014001",
"type": "Circuit Breaker",
"department": "DEV",
"device": "PDU1-P3-B03",
"manufacturer": "Generic"
},
{
"productLine": "opi rack",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "OPI Rack 42U",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Rack",
"department": "DEV",
"device": "PS-PDU-01",

78 Services
"manufacturer": "Generic"
},
{
"productLine": "opi rack",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "OPI Rack 42U",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Rack",
"department": "DEV",
"device": "PS-PDU-02",
"manufacturer": "Generic"
},
{
"productLine": "opi rack",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "OPI Rack 42U",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "Rack",
"department": "DEV",
"device": "PS-PDU-03",
"manufacturer": "Generic"
},
{
"productLine": "ePDU G3 Managed",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "EMA6DB35AGD88C1",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "PDU - Rackmount",
"department": "DEV",
"device": "PS-PDU-A-01",
"manufacturer": "Eaton"
},
{
"productLine": "ePDU G3 Managed",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "EMA6DB35AGD88C1",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "PDU - Rackmount",
"department": "DEV",
"device": "PS-PDU-A-02",
"manufacturer": "Eaton"

79 Services
},
{
"productLine": "ePDU G3 Managed",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "EMA6DB35AGD88C1",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "PDU - Rackmount",
"department": "DEV",
"device": "PS-PDU-A-03",
"manufacturer": "Eaton"
},
{
"productLine": "ePDU G3 Managed",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "EMA6DB35AGD88C1",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "PDU - Rackmount",
"department": "DEV",
"device": "PS-PDU-B-01",
"manufacturer": "Eaton"
},
{
"productLine": "ePDU G3 Managed",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "EMA6DB35AGD88C1",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "PDU - Rackmount",
"department": "DEV",
"device": "PS-PDU-B-02",
"manufacturer": "Eaton"
},
{
"productLine": "ePDU G3 Managed",
"serialNumber": null,
"lifecycleStatus": "Operational",
"ipAddress": null,
"model": "EMA6DB35AGD88C1",
"location": "A1, F1, mm-Building, haimen, Jiangsu, China",
"assetTag": null,
"type": "PDU - Rackmount",
"department": "DEV",
"device": "PS-PDU-B-03",
"manufacturer": "Eaton"
}

80 Services
],
"Count": 19
}
},
"message": "Success"
}

81 Services
4. Troubleshooting and Common Mistakes
4.1. HTTP 400 Bad Request
This error indicates malformed syntax in the POST entity body. This is most caused by missing or
misplaced curly brace, colon or double quote character.

4.2. HTTP 401 Unauthorized


This error indicates that the username and password are invalid. Please check that the username exists
on the system and the password is correct.

4.3. 4HTTP 403 Forbidden


This error indicates that the client has not properly authenticated with the server before trying to
retrieve or send data.

4.4. HTTP 404 Not Found


This error indicates that an invalid URL was requested.

To resolve this problem, only use URLs defined in this guide and double check that there are no typos or
other mistakes in the request.

4.5. HTTP 409 Conflict


This error indicates that there is a conflict between the resource and its internal structure. This conflict
is usually caused by a resource representation that is syntactically valid but contains an invalid value in
one of its fields.

4.6. HTTP 415 Unsupported Media Type


This error indicates that a media type was requested that is not a type the server can deliver for a given
request. It can also mean that no media type was defined at all in the request.

To resolve this problem, the Accept HTTP header must be set according to the documentation in this
guide for each request.

4.7. HTTP 500 Internal Server Error


This error indicates that something went wrong on the server. Errors of this type should be reported to
technical support for resolution.

82 Troubleshooting and Common Mistakes

You might also like