Can the text named "result" in the REST API Explorer response body be deleted in a REST call


Description

When using scripted rest api, the response body looks similar to this body - 

{ "status": "Success", "code": "200", "message": "Created Successful", "incidentId": incNumber, "customHeader": customHeader 

but when testing via rest explorer, the response body returned is

{ "result": { "status": "Success", "code": "200", "message": "Created Successful", "incidentId": "INCV0159407", "customHeader": "createIncidentPO" } } question is can the first part "result": be removed and just the below text as response? { { "status": "Success", "code": "200", "message": "Created Successful", "incidentId": "INCV0159407", "customHeader": "createIncidentPO" } }

Ask is, can the text named "result" in the REST API Explorer response body be deleted or avoided from returning in the response

 

Release or Environment

Any Release

Cause

The text named "result" is hardcoded in REST java code 

Resolution

This is NOT possible with the current release as it is hardcoded inside the Java code. Raise an IDEA using the following link

https://support.servicenow.com/kb_view.do?sysparm_article=KB0755878