I’m using http request activity in studio and receiving error when I add my parameters. Here is the JSON File:
Request Body :
{
“requested_for”:“uhd40”,
“short_description”:“BOSS User Access Requests”,
“description”:“BOSS User Access Requests”
}
Response
{
“result”: {
“Message”: “Request Submitted successfully”,
“Request”: “REQ0103107”,
“Requested_item”: “RITM0119016”
}
}
Can you tell me if I have my Parameters set up correctly? When I remove the Parameters, I get the correct response. When I add them, I’m receiving the error. This code was verified in Postman.
there error received when I preview is :
{“error”:{“message”:“com.glide.rest.util.RESTRuntimeException: The payload is not valid JSON.”,“detail”:“”},“status”:“failure”}
@ashokkarale ,
i was able to save the json body as a text file and use the read text file activity and able to pass into body field of HTTP request and getting a valid response now. Could you possibly help with how to pass a variable to the text file? i would like to have the “requested_for” value be a variable like “employeeid” instead of the value “aci43” and be able to pass any value into the employeeid variable. Below is my text file. Just not sure how to accomplish that in Studio.
{
“requested_for”:“aci43”,
“short_description”:“BOSS User Access Requests”,
“description”:“BOSS User Access Requests”
}