I need help to display message on Retool depending on API endpoint status.
Basically i am calling my API end point from Retool. I want to display message on my Retool i.e.,
if status code is 200 then success message.
if status code is 409 Dulpicate config message.
Mandatory fields missing like that.
Please help me how to read API endpoint status code and display message.
Thanks for your response, however i am not able to access statuscode.
Here is my APIRequest tab data, basically I want to access that status code in case of success, where as for error I have to access Response tab. Below are my responses which I need to access.
Error:
{
"error": {
"data": 0,
"message": "One or more request data is invalid",
"errors": [
{
"message": "level is required"
},
{
"message": "product is required."
},
{
"message": "fieldName is required"
}
]
}
}
I have done in General tab. Now it is working.
Below is my screen shot, however I want to add one line break in between messages.
Could you please check and let me know how can I achieve this.
Move your notification information into the Description field and simply return after each entry and add a title. However, I have not found a way to use a new line after each entry at this time.
It looks like notifications don't support multiline text at the moment, would it work to show each error as a separate notification with a script like the following?