Forum Discussion

Pravin_Sonawane's avatar
Pravin_Sonawane
Icon for Nimbostratus rankNimbostratus
Sep 09, 2015

How to create multiple records in a single POST request via iControl REST API?

We are trying to create multiple records in a single POST request and we are getting a ‘Missing name’ error. Typically if it was not supported, we would have received a ‘operation not supported’ error. However, we get a ‘missing name’ error.

POST Request URL: https://10.18.76.4/mgmt/tm/gtm/topology?ver=11.5.1 HTTP Method: POST Request Body

 

    {
   "kind": "tm:gtm:topology:topologycollectionstate",
   "selfLink": "https://localhost/mgmt/tm/gtm/topology?ver=11.5.2",
   "items":    [
            {
         "kind": "tm:gtm:topology:topologystate",
         "name": " ldns: region /Common/TestPOC1  server: datacenter /Common/TestDC1",
         "fullPath": " ldns: region /Common/TestPOC1  server: datacenter /Common/TestDC1",
         "generation": 1,
         "selfLink": "https://localhost/mgmt/tm/gtm/topology/%20ldns:%20region%20~Common~TestPOC1%20%20server:%20datacenter%20~Common~TestDC1?ver=11.5.2",
         "order": 1,
         "score": 1
      },
            {
         "kind": "tm:gtm:topology:topologystate",
         "name": " ldns: region /Common/TestPOC2  server: datacenter /Common/TestDC2",
         "fullPath": " ldns: region /Common/TestPOC2  server: datacenter /Common/TestDC2",
         "generation": 1,
         "selfLink": "https://localhost/mgmt/tm/gtm/topology/%20ldns:%20region%20~Common~TestPOC2%20%20server:%20datacenter%20~Common~TestDC2?ver=11.5.2",
         "order": 2,
         "score": 1
      }
   ]
}

 

Error received: {"code":400,"message":"Missing name.","errorStack":[]}

What are we missing here? Can multiple records even be created in a single POST call?

No RepliesBe the first to reply