CUC Forums

« Back to CUPI Questions

/vmrest/users?query returns INVALID_PARAMETER

Combination View Flat View Tree View
Threads [ Previous | Next ]
The CUPM admin interface supports creation of Alias values with spaces in them. So I can have a alias value of Test 1
I also understand that Alias values need to be unique. I have tested this in the CUPM admin interface by trying to create two user records with the same alias name, but it will not allow me.
 
From CUPI, I can use the following query method to retreive the User object by alias.
 
Assuming a alias name of test. 
 
/vmrest/users?query=%28alias+is+test%29
 
This does return me a valid response and does return the User object.
 
If the alias has a space in it, thats when I get an error response. Going back to the example, lets try and query for the User with alias Test 1
 
/vmrest/users?query=%28alias+is+Test+1%29
 
This is the response that i get back :
      <ErrorDetails><errors><code>INVALID_PARAMETER</code><message>filter should have three parts: alias is Test 1, type=3</message></errors></ErrorDetails>
 
Any insight will be appreciated.

I did the following with no success

(alias is (Test 1))
(alias is "Test 1")
(alias is 'Test 1')
(alias is {Test 1}) (This actually threw a nice long Java stack trace on the server that was displayed to me)

Looks like to me the server side code is tokenizing by space to read the 3 elements
1. column name
2. command (is or startswith)
3. The value

When the results from the tokenizer returns more than 3 tokens, the code chokes.

Can someone please look at the source code and acknowledge the issue.