beliczazsolt | 2022-02-28 22:22:19 UTC | #1
Hello, I am checking the platform API and it looks like users api gives access to several users field including personal detail fields such as Education, Biography and EmployerInfo. However, I didnt find anything to update the Agent section (btw this is a default type). I tried to track this by tracing the UI and it looks like the UI used PUT /api/v2/users/3e4e0c9f-967a-4611-a435-02011b7f76c6/profile but i dont find anything on users/xxx/profile. The API explorer shows that there is a /api/v2/users/{userId}/profile but it is depricated and there is not PATCH or PUT at all. I would like to update the "name" in the "Agent" section with the Java SDK because this field is used in chats but I can't find the right API. Am I missing something or the PUT flavour of users/xx/profile is not public? If it is not public, any workarounds? thanks, Zsolt
crespino | 2022-03-01 20:44:35 UTC | #2
You are right, /api/v2/users/{userId}/profile has been deprecated. The docs (https://developer.genesys.cloud/api/rest/v2/users/#get-api-v2-users--userId--profile) say to use /api/v2/users instead.
So you should be able to use https://developer.genesys.cloud/api/rest/v2/users/#post-api-v2-users or https://developer.genesys.cloud/api/rest/v2/users/#patch-api-v2-users--userId- to POST or PATCH user properties. Note the PATCH operation seems to have more properties to update.
beliczazsolt | 2022-03-01 21:03:41 UTC | #3
Hi Jim, thanks for the answer. I checked earlier those APIs you mentioned but they don't allow the update of all the profile types, only some of them. Interesting agent is a default built in profile and it is still not on the list (or it is not documented properly). Anyway, I played a bit more with it and I was able to do it without the platform SDK just by creating the json content for the /api/v2/users/xxxx/profile based on what I have seen in the UI and it works. It is not as convenient as using the SDK but it does the job. The SDK (at least the java SDK) did not give me those options which I needed here (UsersApi.putUser*) thanks, Zsolt
tim.smith | 2022-03-01 21:08:51 UTC | #4
beliczazsolt, post:1, topic:13735
I would like to update the "name" in the "Agent" section with the Java SDK because this field is used in chats
There are definitely gaps in the Platform APIs vs. what you can update on a user's profile page. There are projects in progress to address those gaps, but requesting the features you're missing via the ideas site is still helpful as those ideas contribute to prioritization of work. You can submit an idea for this here: https://genesyscloud.ideas.aha.io/ideas.
system | 2022-04-01 21:09:19 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 13735