We are using the WebApi for creating different objects. Creating new nodes or containers works without problems, but the API returns an error when creating a new zone. We are sending this JSON:
Code Select
{
objectType: 6
name: "NewZone"
parentId: 1
}
We are setting parentId = 1, because the object "Entire Network" has object id 1. This returns an "Internal error" with code 46.
I did take a look at the code and it seems impossible to create a node with parentId = 1.
|
if (type == -1 || name == null || parentId == 1) |
https://www.netxms.org/forum/general-support/bug-in-webapi-for-zone-objects/
Migrated from track.radensolutions.com
- Original Issue: NX-2596
- Type: Bug
- State: Fixed
- Priority: Normal
- Subsystem: API
- Created: 2024-09-25 14:16:51 UTC
- Updated: 2024-10-08 15:05:03 UTC
- Reporter: filipp.sudanov (@filippsudanov)
- Last Updated By: Victor Kirhenshtein (@2128506)
We are using the WebApi for creating different objects. Creating new nodes or containers works without problems, but the API returns an error when creating a new zone. We are sending this JSON:
Code Select
{
objectType: 6
name: "NewZone"
parentId: 1
}
We are setting parentId = 1, because the object "Entire Network" has object id 1. This returns an "Internal error" with code 46.
I did take a look at the code and it seems impossible to create a node with parentId = 1.
netxms/src/client/nxapisrv/java/src/main/java/org/netxms/websvc/handlers/Objects.java
Line 377 in 62c5f9e
https://www.netxms.org/forum/general-support/bug-in-webapi-for-zone-objects/
Migrated from track.radensolutions.com