1.2.36 /api/v1/treeview

This API end point lets you retrieve the treeview data structure as a whole or partially by requesting only a branch of the tree. The API also provides a PUT method for this end point which lets you replace the user defined part of the tree for a given M&C name.

Supported HTTP methods: GET, PUT, HEAD, OPTIONS

GET /api/v1/treeview

Gets the complete tree definition for all M&C systems configured in the backend. Includes the auto-generated and the user defined parts of the tree definition

Parameters: none

Expected Payload: none

Replied Payload: A TreeViewNode document containing the complete tree view tree, starting with the ROOT node of the tree.

Return Codes:

Code Description
200 OK, the requested TreeViewNode document is returned.
401 Not logged in. In this case an ApiError document is returned, describing details of the error.

GET /api/v1/treeview/{mncName}

Gets the tree definition for a given M&C system. Includes the user defined part of the tree definition as well as the device list for this M&C system.

Parameters:

Parameter Description
mncName The name of the M&C for which the tree definition shall be read.

Expected Payload: none

Replied Payload: A TreeViewNode document containing the tree branch for the given M&C, starting with the MNCNODE node for this M&C.

Return Codes:

Code Description
200 OK, the requested TreeViewNode document is returned.
404 The requested M&C system does not exist or is actually offline. In this case an ApiError document is returned, describing details of the error.
401 Not logged in. In this case an ApiError document is returned, describing details of the error.

GET /api/v1/treeview/{mncName}/{subsystemName}

Gets the tree definition for a given M&C subsystem.

Parameters:

Parameter Description
mncName The name of the M&C for which the tree definition shall be read.
subsystemName The name of the subsystem to retrieve. This subsystem name also may address nested subsystems, e.g. SUBSYS-1.SUB_SYS-2denotes a subsystem SUSBSYS-2 contained in SUBSYS-1

Expected Payload: none

Replied Payload: A TreeViewNode document containing the tree branch for the given M&C subsystem, starting with the SUBSYSTEM node for this M&C subsystem.

Return Codes:

Code Description
200 OK, the requested TreeViewNode document is returned.
404 Either the requested M&C system does not exist or is actually offline or no subsystem with the given name exists in this M&C system. In this case an ApiError document is returned, describing details of the error.
401 Not logged in. In this case an ApiError document is returned, describing details of the error.

PUT /api/v1/treeview/{mncName}

Replaces the tree definition for a given M&C system with a new version supplied by the client. Echoes the tree definition for this M&C system after the request has been processed.

Parameters:

Parameter Description
mncName The name of the M&C for which the tree definition shall be replaced.

Expected Payload: A TreeViewNode document containing the user defined part tree branch for the given M&C, starting with the MNCNODE node for this M&C. Only the SUBSYSTEM children of this node are processed, if the TReeViewNode has a DEVICELIST child, this is ignored.

Replied Payload: A TreeViewNode document containing the tree branch for the given M&C, starting with the MNCNODE node for this M&C. This is the tree view branch after the request has been processed, it includes the DEVICELIST for this M&C.

Return Codes:

Code Description
200 OK, the requested TreeViewNode document is returned.
404 The requested M&C system does not exist or is actually offline. In this case an ApiError document is returned, describing details of the error.
401 Not logged in. In this case an ApiError document is returned, describing details of the error.