REST API - Search for Change-Number/sys id with Task-Number

Benedikt Kaiser
Tera Contributor

Hi all,

I am currently trying to search for a change-number or change-sysID with an underlying task-Number of the change.

I am trying this with GET Change, however I am not able to find the correct solution.

curl "https://instance.servicenow.com/api/sn_chg_rest/v1/change\
--request GET \
--header "Accept:application/json" \
--user "username":"password"

 

Does someone know how to tackle this problem?

Thank you and best regards, 
Benedikt

 
1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi,

Did you try using REST API explorer? 

Navigate to System Web Services >> REST >> REST API Explorer

Select table: change_task

Sometihng as attached.find_real_file.png

find_real_file.png

 

So, final query will be something as below

https://dev20466.service-now.com/api/now/table/change_task?sysparm_query=number%3DCTASK0010066&sysparm_display_value=true&sysparm_fields=change_request%2Cnumber

Where dev20466 is instance name.

View solution in original post

5 REPLIES 5

Benedikt Kaiser
Tera Contributor

Nice it works, thank you very much 🙂