- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2016 08:33 AM
Hello
I need to get list of change_tasks for given change_request sys_id through REST API.
I make GET response for 'change_task' table, and receive response
{
"result": [
{
"sys_id": "---task-sys-id---",
"change_request": {
"link": "https://[instance].service-now.com/api/now/table/change_request/---request-sys-id---",
"value": "---request-sys-id---"
},
}
]
}
How can I add filter to GET request using sysparm_query to check for change_request.value field?
I am looking to something like "sysparm_query=change_request.value=---request-sys-id---".
I have no problem checking for simple fields, but cannot find documentation for syntax for nested json object.
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2016 09:24 AM
Hi Gleb,
That value property only exists in the JSON response. If you want to query on the sys_id of the change request from the change task, your query should be:
sysparm_query=change_request=---change request sysid---
So altogether that would be:
https://[instanceName].service-now.com/api/now/table/change_task?sysparm_query=change_request=---cha... request sysid---
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2016 08:59 AM
Hi Gleb,
Are you facing any issues with using direct sysparm_query for dot walking field.
https://[instanceName].service-now.com/api/now/table/change_task?sysparm_limit=10&sysparm_query=chan..."what ever the value" is not working?
Thanks
Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2016 10:05 AM
Hi Srinivas,
Yes the link you included didn't work for me. But Brad`s solution completely solves my issue. Thank you for help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2016 09:24 AM
Hi Gleb,
That value property only exists in the JSON response. If you want to query on the sys_id of the change request from the change task, your query should be:
sysparm_query=change_request=---change request sysid---
So altogether that would be:
https://[instanceName].service-now.com/api/now/table/change_task?sysparm_query=change_request=---cha... request sysid---
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2016 09:59 AM
Thank you for help, that is what i needed.