How to have more than one body parameter within a REST connector

I need to have 2 body parameters(clientId and clientSecret) to be able to get our accesstoken. Looks like Novacura only allows 1 body parameter. How can I make this happen?

Hi,

If the parameters are to be sent as a payload of a POST (or PUT/PATCH) you need to define a body parameter of type “Object”. That parameter will then reference a model (data structure).

Typically, these are generated for u if you import a swagger file. But you can also create them based on a JSON file or manually. So, if you don’t generate the operation from a API spec you first need to define the model and then when adding a body parameter to your operation, you choose body type “Model” and reference the model you just created. Models are used for both requests and responses.

Read more about models and how they are created here : Models | Flow Help

We also have a youtube video on the Rest connector. It’s a bit dated maybe but the basics are the same: Tutorial: How to set up and use the Novacura Flow REST Connector - YouTube

Hope this is helpful :slight_smile:

Hi,
That worked great. I created a model with 2 data items of string.


Then within my operation, I created a new body parameter using the model I created manually.

For the outputs I created a model using the JSON from Postmans response and tied that model to the OK and Error outputs.


Updated my flow with with the new parameters and executed it.


As you can see I have the Access and Refresh token now.

Thank you,
Tim

2 Likes

Nice! And a big thanks to you for documenting the setup and sharing it with the forum. Much appreciated :slight_smile:

@Keyhole You have probably made a lot of progress on PortPro, but I had built out the API for 08.23.2023. You can use this link to get a copy of that version if you’d like :slight_smile: . The link is good for one year.