VMware Cloud Community
legioon
Enthusiast
Enthusiast
Jump to solution

How to Post JSON Array/string value with REST ?

Hello,

I am using vco 7.2. I can post string,number, boolean value to vCO with POSTMAN rest client but I could not post Array/String value. How to make this ?

{

"parameters": [

    {

      "type": "string",

      "name": "nameandsurname",

      "value": {"string":{ "value": "myname"}}

    },

    {

      "type": "Array/string",

      "name": "arrayvariable",

      "value": {"string":{ "value": "value1"}}

    }

  ]

}

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

Request body could look like the following:

{

   "parameters":[ 

      { 

         "value":{ 

            "array":{ 

               "elements":[ 

                  { 

                     "string":{ 

                        "value":"value1"

                     }

                  },

                  { 

                     "string":{ 

                        "value":"value2"

                     }

                  },

                  { 

                     "string":{ 

                        "value":"value3"

                     }

                  }

               ]

            }

         },

         "type":"Array/string",

         "name":"arrayvariable"

      }

   ]

}

View solution in original post

3 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

Request body could look like the following:

{

   "parameters":[ 

      { 

         "value":{ 

            "array":{ 

               "elements":[ 

                  { 

                     "string":{ 

                        "value":"value1"

                     }

                  },

                  { 

                     "string":{ 

                        "value":"value2"

                     }

                  },

                  { 

                     "string":{ 

                        "value":"value3"

                     }

                  }

               ]

            }

         },

         "type":"Array/string",

         "name":"arrayvariable"

      }

   ]

}

legioon
Enthusiast
Enthusiast
Jump to solution

many thanks Ilian it's working.

0 Kudos
Sha_man
Contributor
Contributor
Jump to solution

This solution also worked for me.

0 Kudos