cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1098
Views
0
Helpful
0
Replies

FMC create bulk rules containing Realm user group via API

jonasvn65
Level 1
Level 1

Hi,

 

I need to add around 100 rules and I used the API to do this and all worked fine except 1 thing. I had to remove some code that added the user group to each rule in the body for the post. Whenever it is added i get the Error in connection --> 422 Client Error: Unprocessable Entity for url:

 

I used a get on another rule and used the users object in the json in the body that was used for the POST. Whenever I remove the users it will work so prety sure the fault is in here but it looks okay. Anyone who has managed to add user groups to a rule via the api ?

 

 

user field in the body:

 

"users": {
"objects": [
{
"id": "2336a13c-d804-11ea-8bb2-80f7e2478652_7",
"type": "RealmUserGroup",
"name": "groupname",
"realm": {
"id": "2336a13c-d804-11ea-8bb2-80f7e2478652",
"type": "Realm"
}
}
]
}

0 Replies 0