GET method call in REST API call is not returning desired data.

Gulzar Manuja2
Kilo Guru

Dear All,

Greetings !!

I am working on a requirement wherein I have to integrate our ServiceNow instance with Sailpoint application. We have received following Endpoint to make a GET method call from Sailpoint in order to fetch record for a specific user.   

https://xxxxxx.api.identitynow.com/v3/accounts?filters=sourceId eq "aaaaaaaa7d7ccfef017d7ed0f3bbbbbb" and name eq "zzzz"

However, when I used this endpoint as it is in the Endpoint field of the GET method, I encountered "Invalid URI" error. I believe the error was thrown by the system as above endpoint has spaces and keywords like 'eq'. Then, I tried to modify this endpoint(as mentioned below) so that the same can be accepted by ServiceNow, however, it did not work correctly. System is fetching all the records from the other system instead of a specific account with name 'zzzz'

https://xxxxxx.api.identitynow.com/v3/accounts?sysparm_query=sourceId%3Daaaaaaaa7d7ccfef017d7ed0f3bbbbbb&name=zzzz

Could someone help me to rectify the issue please? I guess I have not been able to build the query correctly. Would appreciate any input.

 

Thanks & Regards,

Gulzar Manuja

1 ACCEPTED SOLUTION

Hi,

did you try to use %22 which is url encoded value for "

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

13 REPLIES 13

AnirudhKumar
Mega Sage
Mega Sage

try this:

https://xxxxxx.api.identitynow.com/v3/accounts?filters=sourceId&eq=aaaaaaaa7d7ccfef017d7ed0f3bbbbbb&name=zzzz

Hi Anirudh,

Thanks for your response. However, I am afraid it did not work.

Best Regards,

Gulzar Manuja

 

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

try this

%26 for &

https://xxxxxx.api.identitynow.com/v3/accounts?sysparm_query=sourceId%3Daaaaaaaa7d7ccfef017d7ed0f3bbbbbb%26name=zzzz

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

Thank you very much for your response. Unfortunately, it's still returning all accounts instead of the one with 'zzzz' name.

Best Regards,

Gulzar Manuja