Quantcast
Viewing latest article 44
Browse Latest Browse All 182084

NSX-T Declarative API

I need to use declarative API to perform some automation tasks, for this instance i need to create few segments.

 

Below code is to create just a single segment and i am putting a Patch request to https://nsx-fqdn/policy/api/v1/infra

 

{

 

    “resource_type”:“infra”,

    “children”:[

        {

        “resource_type”:“ChildSegment”,

        “Segment”:{

            “resource_type”:“Segment”,

            “display_name”:“Post01”,

            “id”:“Post01”

                   }

        }     

                ]

}

 

But i get the below error, can anyone please help to get this right
{

 

    "httpStatus":"BAD_REQUEST",

    "error_code":220,

    "module_name":"common-services",

    "error_message":"Unexpected character ('“' (code 8220 / 0x201c)): was expecting double-quote to start field name"

}


Viewing latest article 44
Browse Latest Browse All 182084

Trending Articles