Introducing SOC Insights for BloxOne Threat Defense: Boost your SOC efficiency with AI-driven insights to eliminate manual work and accelerate investigation and response times. Read the blog announcement here.

API & Integration, DevOps,NetOps,SecOps

Reply

Unknown Object Type?

Techie
Posts: 7
431     0

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
}
]

Re: Unknown Object Type?

Techie
Posts: 7
432     0
{ "Error": "AdmConProtoError: Unknown object type ()", "code": "Client.Ibap.Proto", "text": "Unknown object type ()" }

Re: Unknown Object Type?

Moderator
Moderator
Posts: 289
432     0

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?

Techie
Posts: 7
432     0

Thank you. Very helpful

Showing results for 
Search instead for 
Did you mean: 

Recommended for You