I am wondering why the user field ‘public name’ is not exposed by the REST API endpoints (might be more):
/rest/api/2/user?accountId=xyz
/rest/api/2/myself
Since it is the public name, I would think it should be visible for the REST API. Unfortunately it is not in the result. Unlike the Confluence REST API, which exposes this field.
Since I need it in my Jira app, do you have any ideas how to get it?
Hi @SvenHe. The Public name defined by a user in account settings is only used if the Full name visibility settings are restricted.
So, if Full name visibility setting are set to Anyone, then Full name is returned in the API response field displayName. However, if Full name visibility settings are restricted, then Public name is returned in displayName.
Additionally, if you’re calling myself endpoint, you’re probably always going to see Full name.