VMware Cloud Community
lshgfksahkjashg
Contributor
Contributor
Jump to solution

vRO API - how to update an input presentation? Simple example needed.

Hello mighty community,

can somebody tell me, how the f*** I can update an input presentation via REST API?

I know, I have to use the following entrypoint:

PUT <host>:8281/vco/api/workflows/<workflow_id>/presentation/instances/<execution_id>/

But I am not able to figure out the correct JSON body.

The swagger doc gives some generic example but I always get an 400 Bad Request.

Can somebody provide a simple working example?

Thx and Cheers

Roland

----

Example from swagger-doc:

{

  "executionId": "string",

  "parameters": [

    {

      "description": "string",

      "encryptValue": true,

      "name": "string",

      "scope": "local",

      "type": "string",

      "updated": true,

      "value": {

        "encoded": "string",

        "objectType": "string",

        "text": "string"

      }

    }

  ],

  "profilerOptions": {

    "enabled": true

  }

}

1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

Try with something like the following request body (presentation with 2 input fields - arg_in_0 of type string and arg_in_1 of type number)

{

  "parameters": [

    {

      "value": {

        "string": {

          "value": "abc"

        }

      },

      "type": "string",

      "name": "arg_in_0",

      "scope": "local",

      "updated": true

    },

    {

      "value": {

        "number": {

          "value": 42

        }

      },

      "type": "number",

      "name": "arg_in_1",

      "scope": "local",

      "updated": true

    }

  ]

}

I haven't tried the above, but there is a good chance for it to work.

View solution in original post

2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

Try with something like the following request body (presentation with 2 input fields - arg_in_0 of type string and arg_in_1 of type number)

{

  "parameters": [

    {

      "value": {

        "string": {

          "value": "abc"

        }

      },

      "type": "string",

      "name": "arg_in_0",

      "scope": "local",

      "updated": true

    },

    {

      "value": {

        "number": {

          "value": 42

        }

      },

      "type": "number",

      "name": "arg_in_1",

      "scope": "local",

      "updated": true

    }

  ]

}

I haven't tried the above, but there is a good chance for it to work.

lshgfksahkjashg
Contributor
Contributor
Jump to solution

Thx for this quick and correct respone!! Smiley Wink

Learning:

  • do not stick to the swagger doc
  • switch on brain and reuse same data structure of other similar REST calls...

Cheers, Thx and thumbs up!

Roland

0 Kudos