0

I am new in this field, please help.

when i am trying to get value from incident table using servicenow REST API instead of Name in assigned_to field i get a link. how can i get name using REST API. i am using python

Query

url = 'https://comapanyname.service-now.com/api/now/table/incident?sysparm_query=assignment_group=assignment_group=7a76f60f3d42002

Result

'assigned_to': {'link': 'https://companyname.service-now.com/api/now/table/sys_user/0db6ec308f6723a90', 'value': '0db6ec308f6723a90'}
user10989738
  • 81
  • 1
  • 11

2 Answers2

3

If you want the name of the assignment group, you need to set the parameter sysparm_display_value to either "true" or "all" (default is "false"). If you do not want the link, you can set the parameter sysparm_exclude_reference_link to "true" (default is "false").

See: https://developer.servicenow.com/app.do#!/rest_api_doc?v=madrid&id=r_TableAPI-GET

giles3
  • 465
  • 2
  • 9
1

you get this link because this field is a reference field. That means it does not store the information of the user instead it stores a reference to another record. When you send a GET to the link you will receive the user information.

Cheers

t3chnico
  • 64
  • 6