Issues with Exact Search Using Datahub REST Api and Solution specifying Quotes and Escapes

Original Slack Thread

I’m having an issue doing exact search using the Datahub REST Api.

I’m using colon search to do an exact match on name, but it breaks when the name includes spaces.

--header "$AUTH" \
--data '{"input": "name:foo bar","entity": "dataHubIngestionSource","start": 0, "count": 10}')```
In this example, the exact search only searches on “foo” and not “foo bar”. Is there any way to get the exact search to include spaces rather than deliminate on them?

Try this, we quote the string foo bar with " and then escape it for json with '
--data '{"input": "name:\"foo bar\"","entity": "dataHubIngestionSource","start": 0, "count": 10}'