Hello!
I am working with Sophos UTM9 API. I am trying to create Network Group and assign members there via Python and requests.
I was able to easily get all objects/groups from device, but as soon as I try create simply from https://<url>:4444/api (POST /objects/network/group/) it gives me:
"name": "The network group object requires a Perl array for the members list attribute." (400 code).
I entered only Group name, as I want for start only create one without assigning, but also interested with member assign.
I didn't find anything across documentation what exactly api needs to create Groups. As I understand I need to add something X-Restd-Insert
any idea what exactly? P.S. maybe someone know how then request of creating group and assigning members can be translated to web URL link?
curl looks like this:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'X-Restd-Insert: network.group' --header 'Authorization: Basic <key>' -d '{"comment":"","name":"TEST"}' 'https://<url>:4444/api/objects/network/group/'
output:[
{
"name": "The network group object requires a Perl array for the members list attribute.",
"rights": "",
"attrs": [],
"Oattrs": [
"class",
"type"
],
"objname": "",
"del_object": "",
"ref": "",
"msgtype": "DATATYPE_OBJECT_ATTRIBUTE",
"format": "The %_O object requires %_d for the %_A attribute.",
"class": "network",
"type": "group",
"perms": "",
"never_hide": 0,
"fatal": 1
}
]%
This thread was automatically locked due to age.