POST Create Scenario issue - when using Scenario Blueprint to auto create a scenario

Hello Makers,

I am trying to create a scenario run time (dynamic) using the GET Scenario Blueprint approach.

And when I make the Create Scenario POST call, I consistently get the below error.

TypeError: Invalid json string in parameter 'blueprint'. Value has to be string.

I see that this POST API takes blueprint & scheduling as string , but I am guessing the Text Parser output to this module is a string. Hence, I thought it will work.

My guess is that the input is not a valid JSON string.

Any ideas, how to achieve this and resolve this issue ?

I have the same problem, if anyone can help it would be greatly appreciated :raised_hands:

1 Like

Hi @PraneethG , I have found the answer thanks to @zezutom and the Make API Documentation.

I had this problem too and couldn’t figure out the solution, until I really looked into the syntax of the JSON.

The blueprint and the Scheduling variables have to be written in a strange format where you put a reverse backslash before and after every variable name and variable value. It looks like this :

Hope it will help you and everyone passing by :slight_smile:

2 Likes

@Albanmana @PraneethG

You have to put a backslash before every " to make sure the JSON is send as a string. This is called JSON escaping.

2 Likes

Thank you for the precision, will look into it :ok_hand:

1 Like