Query device types based on predefined criteria.
/plat/res/category
Query parameter | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
name |
Type name.
String type. Wildcards are supported. Optional. No default value.
|
||||||||||
start |
Location of the first returned record in the query result.
Integer type. Optional. The default value is 0. If the input parameter is smaller than 0, the parameter is automatically changed to 0.
|
||||||||||
size |
Total returned records.
Integer type. Optional. The default value is 10. If the input parameter is smaller than 0, the parameter is automatically changed to 0. If the input parameter is greater than 1000, the parameter is automatically changed to 1000.
|
||||||||||
orderBy |
Sort field of the returned result.
String type. Optional. The default value is id. Valid values include id, name, and preDefined.
|
||||||||||
desc |
Sort records in descending order.
Boolean type. Optional. The default value is false. It is valid only when the orderby parameter is specified.
|
||||||||||
total |
Only records that match the sort criteria are returned.
Boolean type. Optional. The default value is false. When the value is true, the start and size attributes are invalid, the returned message body is empty, and the Message Header field gives the records that match the sort criteria.
|
HTTP/1.1 200 OK Total: 15
<list> <deviceCategory> <id>0</id> <name>Router</name> <preDefined>true</preDefined> <link rel="self" href="http://host:port/imcrs/plat/res/category/0"/> </deviceCategory> ... <link rel="next" href="http://host:port/imcrs/plat/res/category?start=10&size=10"/> </list>
For the description on each field of the returned value, see the API document for Query Device Type.
Query all device types.
GET http://host:8080/imcrs/plat/res/category?start=0&size=1000 accept: application/xml ...
HTTP/1.1 200 OK Content-Type: application/xml ... <list> <deviceCategory> <id>0</id> <name>Router</name> <preDefined>true</preDefined> <link rel="self" href="http://host:port/imcrs/plat/res/category/0"/> </deviceCategory> <deviceCategory> <id>1</id> <name>Switch</name> <preDefined>true</preDefined> <link rel="self" href="http://host:port/imcrs/plat/res/category/1"/> </deviceCategory> ... </list>