- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Unknown Object Type?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 08:27 AM
I am getting unnown object type errors when trying to do a PUT to disable in DHCP. I can do a single API call no problem but when I try to do multiple I get the error. What am I doing wrong? Any insight is appreciated. TIA
PUT: https://ibloxgm.XXXXXX.com/wapi/v2.11.5/
JSON Body
[
{
"_ref": "network/ZG5zLm5ldHdvcmskMTAuMjAwLjI0My4wLzI0LzA:10.200.243.0/24/default",
"network": "10.200.243.0/24",
"network_view": "default",
"disable": true
},
{
"_ref": "network/ZG5zLm5ldHdvcmskMTAuMjAwLjg1LjAvMjQvMA:10.200.85.0/24/default",
"network": "10.200.85.0/24",
"network_view": "default",
"disable": true
}
]
Solved! Go to Solution.
Re: Unknown Object Type?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 08:42 AM
Re: Unknown Object Type?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 05:15 AM
You will want to do a PUT directly to the _ref value. It's one PUT at a time for each network:
PUT: https://ibloxgm.XXXXXX.com/wapi/v2.11.5/network/ZG5zLm5ldHdvcmskMTAuMjAwLjI0My4wLzI0LzA:10.200.243.0/24/default JSON Body { "disable": true }
But you can combine them into a mutibody call, like this:
POST: https://ibloxgm.XXXXXX.com/wapi/v2.11.5/request JSON Body [ { "method":"PUT", "object":"network/ZG5zLm5ldHdvcmskMTAuMjAwLjI0My4wLzI0LzA:10.200.243.0/24/", "data": { "disable": true } }, { "method":"PUT", "object":"network/ZG5zLm5ldHdvcmskMTAuMjAwLjI0My4wLzI0LzA:10.200.243.0/24/", "data": { "disable": true } } ]
pRe: Unknown Object Type?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 06:57 AM
Thank you. Very helpful