Result object should be remove in response body

srinidhi
Tera Guru

Hello Team,

 

When i hit the API am getting below response.

{
  "result": {
    "message": "Records created successfully in UserTable and ProblemTable"
  }
}

 I don't want the result object to be shown.

can you please help me in this.

 

Thanks.

1 ACCEPTED SOLUTION

Hi Srinidhi,

 

Sorry, I believe we can't change the way the data is shown in Postman. 

 

But if you are trying to retrieve the information from ServiceNow, you can try Scripted Rest API change the response format.

 

https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/servicenow_application_developer... 

 

Regards,

Tharun Kumar

View solution in original post

4 REPLIES 4

tharun_kumar_m
Mega Guru

Hi Srinidhi,

 

This is the result in JSON format. If you don't want the word "result", you can create a new array and insert only the inner array of the response.

If you don't want the whole response to be displayed, please provide us more information like where you are seeing this response and what you would like to see instead of this.

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumbs up.

 

Best regards,

Tharun Kumar

Hello Tharun,

I want to see only the response like below. Am seeing this response from the postman.

 

"message": "Records created successfully in UserTable and ProblemTable"

Thanks.

Hi Srinidhi,

 

Sorry, I believe we can't change the way the data is shown in Postman. 

 

But if you are trying to retrieve the information from ServiceNow, you can try Scripted Rest API change the response format.

 

https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/servicenow_application_developer... 

 

Regards,

Tharun Kumar

Thanks @tharun_kumar_m .