mahdi_gara1 Valued Contributor.
Valued Contributor.
236 views

Passing a JSON object as input to OO Central

Hi there, 

i want to send a RESTfull request to HP OO central for resuming an execution flow. I tested the request before using sample data input. 

In my case now, i want to pass a hole Json object in the data input.

there is my code :

{
"action":"RESUME",
"data":{
"branchId" : null,
"input_binding" :{ "computeEndpoint" : "http://192.1.1.184:8774/v2.1",
"authToken":"gAAAAABZJEZqA95-faMtS1nnVk1rRNfG0yVDS7bk0BOEM37MY7lrebVsu-oPwMrmwN5aoaElY419NLNH0KW_NKJ5PHGMxPjhQ-SK0mdN8U1HkXUyUM8gGjCsR6rB6JUstmou2CIlxIZicqas_8kzfUVOeVgaYWB6RIrYoD7oTdmLUtLy6k",
	"name" : "gg",
"imageRef" : "c441edbf-8c24-4464-b4e6-7f96dce73be6",
"flavorRef" : "0"
}
      

}
}

but i want to add another filed like that :

"networks" : "[{"uuid" : "9f2989d3-c859-4ff5-ae0b-163e4562ea38 "}] "

the flow won't work in Studio unless i pass the code above as input .

[{"uuid" : "9f2989d3-c859-4ff5-ae0b-163e4562ea38 "}]

 

I really need help please.

 

Regards, 

 

Tags (1)
0 Likes
1 Reply
AndreiTruta Outstanding Contributor.
Outstanding Contributor.

Re: Passing a JSON object as input to OO Central

Is this similar to the other post: https://community.saas.hpe.com/t5/Operations-Orchestration/HP-OO-Studio-Cloud-content-pack-for-Openstack/td-p/1496393?nm ?

To add another field you could use this operation: Add JSON Property to Object

Below is a snippet of its description:

The 'Add Property to Object' operation can be used to add a property with a simple string value.

Examples:
1)
Inputs:
jsonObject: {}
newPropertyName: test
newPropertyValue: [1,2,3]
Result:
{ "test":[1,2,3]}

Andrei Vasile Truta
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.