Hello,
I am trying to use the FMC REST API with Postman and would like to append addresses to a network group. So far all that I have found is how to edit the group. So I can add/remove/edit IP address, but have to make sure I take the whole body of that group and add it to my PUT request body, then add/remove/edit IP addresses in the literals.
My end goal is to be able to make a POST request to grab my token, then make a simple small request of "literals" (IP addresses) that I would like to add. If there is something I'm doing wrong or a better way to do this please let me know. Any help is greatly appreciated!
Add IPs
PUT: {{fmcIP}}/api/fmc_config/v1/domain/{{domainUUID}}/object/networkgroups/{{objectID}}
Body:
{
"links": {
"self": "{{fmcIP}}/api/fmc_config/v1/domain/{{domainUUID}}/object/networkgroups/{{objectID}}"
},
"type": "NetworkGroup",
"literals": [
{
"type": "Host",
"value": "IP"
},
{
"type": "Host",
"value": "IP"
},
..................
],
"overridable": false,
"description": "NetworkGroupDesc",
"name": "networkGroupName",
"id": "",
"metadata": {
"timestamp": ###########,
"lastUser": {
"name": "abcdefg"
},
"domain": {
"name": "Global",
"id": "{{domainUUID}},
"type": "Domain"
}
}
}