API - how to return delimited file sources

I can return all sources but having issues filtering for delimited file connectors.

My Python logic is using the below API, I have tried a few variations. The below is not working.

https://{tenant}.api.identitynow.com/v3/sources?filters=connectionType%20eq%20file

thanks for any help

Try this

url = "https://{tenant}.api.identitynow-demo.com/v3/sources?filters=connectionType eq \"file\""

Hi @ts_fpatterson ,
Check the filters parameter format. The query syntax might be slightly different. Sometimes, you need to ensure proper URL encoding.
For Ex:, spaces should be replaced with %20, but depending on the API, you might need to use + for spaces. You can try:

https://{tenant}.api.identitynow.com/v3/sources?filters=connectionType+eq+‘file’

or:

https://{tenant}.api.identitynow.com/v3/sources?filters=connectionType eq ‘file’

1 Like

@ts_fpatterson -

use this -

https://{tenant}.api.identitynow.com/v3/sources?filters=connectionType%20eq%20%22file%22

This should work.

1 Like

Hi @ts_fpatterson
Please try using the other way.
I tried https://{tenant}.api.identitynow.com/v3/sources?filters=connectionType ne \"direct\" in my python scripts using requests module and if you’re using http.client module, please try conn.request("GET", "/v3/sources?filters=connectionType%20ne%20%22direct%22", payload, headers).

conn = http.client.HTTPSConnection("{tenant}.api.identitynow.com") for reference.
Thanks!

1 Like

Thank you, this worked.

In doing some further research, when using the requests library in Python to make API requests with query parameters, you generally don’t need to manually encode special characters in the parameter values. The requests library handles the URL encoding for you automatically.

2 Likes