We are having an issue trying to use the Cloudera Navigator API to retrieve information for file names that have spaces in them. We can search for these file names in the Navigator UI by wrapping the file name in quotes. But, so far, we've been unable to figure out how to do it using the API.
We've tried with the original file name:
http://navigator.url.com:7187/api/v9/entities/?query=parentPath:(/some/parent/path) AND originalName:(Prov Layout-Others.txt)
We've tried by replacing the space with "%20":
http://navigator.url.com:7187/api/v9/entities/?query=parentPath:(/some/parent/path) AND originalName:(Prov%20Layout-Others.txt)
We've tried wrapping the file name in quotes within the URL:
http://navigator.url.com:7187/api/v9/entities/?query=parentPath:(/some/parent/path) AND originalName:("ProvLayout-Others.txt")
So far nothing has worked. Has anyone else run into this problem and, if so, is there a solution?
Thanks.
Turns out the way to search for file names with spaces in them is to replace the spaces with asterisks (*) when constructing the REST API URL.