Source Name with '+' in it causing issues in API's

Hi

I have a source name has a special character in it, say a + sign.

I have a script I am trying to call /v3/sources with a filter name eq <sourcename> but the + sign is making it not work

I tried encoding the + to %2B but still doesnt work.

eg /v3/sources?limit=50&offset=0&filters=name sw "mysource%2B"

I dont want to use filter name sw <sourcename> where I remove the + from the source name, as this is hacky.

Any ideas on how to escape the + ?

Thank you

Doesn’t look like you have a lot of leeway into doing this at the filter parameter level. Have you considered getting the source with the ID instead?
GET {{baseUrl}}/sources/:id

If you have a way to know the ID of the source you’re looking for in advance, you can circumvent the filter string construction and the complexity altogether.

Hi Sushant

Thanks for the reply. I am trying to look up the source ID. That is the purpose of my query/filter.

The plus(+) in the filter parameter is getting treated as space.

E.g., if you have a source named as 'mysource ’ with a trailing space, the API call to {{baseUrl}}/sources?filters=name sw "mysource+" would return it instead of a source named mysource+.

This could be a bug in SailPoint and you should report this bug with the SailPoint. They have handled other special characters as well.

1 Like

You can list all sources and loop through sources. Then in your script, you can check sourceName with substring of your choice. The substring can be found in the source that you are trying to fetch. That way you can filter your desired source.

I hope this helps.

1 Like

Thanks Kapil, I feel this may be the only way until SailPoint fix this.