Jason_Curry | 2016-10-13 15:52:45 UTC | #1
Hi,
I've run into a couple issues with some User API endpoints and I figured this is a good place to post and have a discussion about them. I probably should have done this sooner.
My Issues:
- The User Search endpoint is slow.
I've found it to be too slow for use when implementing an @mention system. Initial requests can take seconds to complete and that doesn't look super responsive on the frontend. I'm not exactly sure how PureCloud is implementing their mentioning system but it's most definitely faster than this public endpoint. If I could get that kind of performance from some publicly documented User API that'd be great.
- User Search doesn't work for id
I looked through the documentation to see if there's some restriction on searchable fields but i don't see anything. I've tested against the User Search API for the "name", "email", "state", "department" fields and they all work. But when I try to do search using the "id" field, I get nothing, even if I use EXACT, CONTAINS, TERM, or TERMS types.
- The User API end point documentation is lacking
I feel like there needs to be some better examples and more explanation of the limitation of certain end points. For example, User Search could use a better example for the grouping/operators and User Update could use some documentation on the relationship between media types. Which brings me to my next point.
- User Update might not be behaving as expected
Basically, I'd expect that by sending a PATCH request to the update endpoint with an empty set of addresses, that the response would be a user with an empty set of addresses. This is not always the case. It removes everything that isn't mediaType = EMAIL. If you send the request with an address array that's a subset of the current addresses, nothing is updated and you get back the original "old" addresses.
- There's no bulk retrieval end point for getting users by id
I'm trying to load a list of resources that require User data. Each one of these resources when I load them have to make an additional request to /api/v2/user/{userId} to get User data. This isn't a huge problem since the application is still in development, but scaling up loading these resources is going to become slow due to the overhead of waiting for many individual requests to finish.
That's all I got.
If anyone has solve these problems (or aren't experiencing these problems at all) please let me know. It's totally possible I'm just setting up my requests all wrong or that I'm missing some details somewhere.
Thanks
system | 2017-08-28 19:27:58 UTC | #2
This post was migrated from the old Developer Forum.
ref: 504