Rally - WSAPI: REST Query on User record failing due to Case sensitivity
search cancel

Rally - WSAPI: REST Query on User record failing due to Case sensitivity

book

Article ID: 140269

calendar_today

Updated On:

Products

Rally SaaS

Issue/Introduction

When running a REST GET query to retrieve Rally users "objectid" case match is not working.

Many times this is failing because the email address that is sent in the REST call is not an exact case match to the email address of the user within Rally.

Example:  https://rally1.rallydev.com/slm/webservice/v2.0/user?query=(EmailAddress = <User>@<Company.com>)&fetch=ObjectID

This returns the object id for the user.

Example:  https://rally1.rallydev.com/slm/webservice/v2.0/user?query=(EmailAddress = <User>@<Company.com>)&fetch=ObjectID

This does not return the object id because the user email in Rally is "<User>@<Company.com>". 

Notice the first.last is lower case.

 

Cause

If the attribute is contained within quotes then it will need to be an exact case match as our API is interpreting this as a literal match.  If the attribute is using a contain or something similar then the case match is not necessary.

Resolution

Instead of using an equals (=) operator in the query, use a contains operator:

 

https://rally1.rallydev.com/slm/webservice/v2.0/user?query=(EmailAddress CONTAINS "<User>@<Company.com>")

 

If the attribute is contained within quotes,  it will need to be an exact case match as our API is interpreting this as a literal match.  If the attribute is using a contain or something similar then the case match is not necessary.

Additional Information

capitalization; agile central; rally; wsapi; web services api, api call, query