Convert from GET to POST

Hello all,

I would like your help to convert from GET to POST requests.
I am migrating to a new Cisco FMC while using API Explorer. Getting the objects is easy. however, changing it to the POST format is frustrating. any suggestions please?
Cisco suggested using Postman or FireRest library.
any help please??

Hey @yskaf :wave:

Welcome to the Postman Community! :postman:

You’re going to need to provide a lot more information about the API and the structure of the requests in order for people to help you here. :pray:

hi Danny, please find below details:
GET REQUEST FROM FMC NETWORK OBJECT GROUPS EXAMPLE:

{
      "links": {
        "self": "https://10.4.32.150/api/fmc_config/v1/domain/e276abec-e0f2-11e3-8169-6d9ed49b625f/object/networkgroups/000C2961-2A05-0ed3-0000-017179870965"
      },
      "type": "NetworkGroup",
      "objects": [
        {
          "type": "Host",
          "name": "Object1",
          "id": "000C2961-2A05-0ed3-0000-017179869282"
        },
        {
          "type": "Host",
          "name": "Object2",
          "id": "000C2961-2A05-0ed3-0000-017179869303"
        },
        {
          "type": "Host",
          "name": "Object3",
          "id": "000C2961-2A05-0ed3-0000-017179869345"
        },
        {
          "type": "Host",
          "name": "Object4",
          "id": "000C2961-2A05-0ed3-0000-017179869327"
        }
      ],
      "overridable": false,
      "name": "NetworkObject1",
      "id": "000C2961-2A05-0ed3-0000-017179870965",
      "metadata": {
        "timestamp": 1720609602754,
        "lastUser": {
          "name": "apiuser"
        },
        "domain": {
          "name": "Global",
          "id": "e276abec-e0f2-11e3-8169-6d9ed49b625f",
          "type": "Domain"
        }
      }
    }

and this is the format it should be in the POST REQUEST:
{
  "name": "networkgroup_obj1",
  "objects": [
    {
      "type": "Network",
      "id": "NetworkObjectUUID"
    },
    {
      "type": "Host",
      "id": "HostObjectUUID"
    },
    {
      "type": "Range",
      "id": "RangeObjectUUID"
    }
  ],
  "literals": [
    {
      "type": "Network",
      "value": "1.2.3.0/24"
    },
    {
      "type": "Host",
      "value": "1.2.3.4"
    }
  ],
  "type": "NetworkGroup"
}

It’s still unclear what the structure of the POST request should be and how the API expects that to be constructed.

You would be able to get this from the documentation - Are you looking at this to get that information?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.