while retrieving the record from the field using rest api getting sys id of the request instead of display value

Srishti5
Tera Contributor

Hi All,

We have a third party application where we need to populate the  field value from the service now table  field value. While retriving the record from the field using api  the sys id is getting displayed instead of the display value. The field type is image.

Is there anyway that we can retrive the image instead of sysId or we can update the field with the image url.

e.g: "field_name":"sysId"

 

 

 

 

3 REPLIES 3

asifnoor
Kilo Patron

Hi

In the api instead of the field sys_id, access the specific field name, for example if you are fetching data from attachment table, then use the field file_name.

JC Moller
Giga Sage

Hi,

Probably you need to retrieve the file from the Attachment API. Link: https://developer.servicenow.com/dev.do#!/reference/api/orlando/rest/c_AttachmentAPI#r_AttachmentAPI...

Fire up a test in Postman application and have a look at what parameters you need to configure to achieve what you are looking for. 

find_real_file.png

BR,

Jan

guywilliamsgd
Tera Contributor

In the Rest API explorer, set this property to true. 

sysparm_display_value = true

 

find_real_file.png