The point is, the ids are returned as email addresses, not as actual numeric ids. Is this a problem with my RT installation? If it is the expected behavior - what was the reason for this and how can I make API return the numeric ids instead of emails for user ids?
If the URL doesn’t contain any whitespaces - it returns the expected user object. If there is a whitespace in the URL (which happens if the user doesn’t have an email set, but does have a set RealName, the example would be https://MY-RT/REST/2.0/user/John Doe) - it returns 404. Searching for numeric ids (like [{"field": "id", "operator": ">=", "value": 12345}]returns just the list of all users.
RT version is 4.4.4
REST2 version seems to be 1.09, according to GitHub - bestpractical/rt-extension-rest2 (we are using the latest version from there)
The described format is returned anywhere where there can be users in response. For example:
POST https://MY-RT/REST/2.0/users/
[
{
"field": "id",
"operator": ">=",
"value": 1000
},
{
"field": "id",
"operator": "<=",
"value": 1100
}
]
The response is as described in the first post.
GET https://MY-RT/REST/2.0/group/123456
...
"Members": [
{
"_url": "https://MY-RT/REST/2.0/user/support@example.com",
"id": "support@example.com",
"type": "user"
},
{ // this user doesnt have an email set
"type": "user",
"id": "John Doe",
"_url": "https://MY-RT/REST/2.0/user/John Doe"
},
{
"_url": "https://MY-RT/REST/2.0/user/jd@example.com",
"type": "user",
"id": "jd@example.com"
},
{
"_url": "https://MY-RT/REST/2.0/group/554525",
"id": "554525",
"type": "group"
},
...
Wow, this actually worked! It still doesn’t resolve the issue with not being able to search based on user ids, but this already helps a lot. Thank you!
I’m aware of that (actually used some pretty dirty webpage parsing to extract numeric ids from ticket roles to get the users from API before), but this doesn’t work for queries like
As such queries seem to be looking at usernames rather than numeric ids. In case provided above it returns all the RT users, not only those with their ids between 1000 and 1300 (as it stands now, “total” key in response to this example query contains the value of 21060).
Hello, is there a place where one can see all the bugs submited to RT development team and how they being resolved?
All I could find is an email address for correspondence…
Thanks