Missing 'Public name' field in Jira REST API user endpoints

Hi there,

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?

Thanks in advance,
Sven

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.

1 Like

Hi @nmansilla,

thanks for your quick reply.

So I can always rely on displayName field? Either its value is the full name or the public name? That would be sufficient in my case.

btw. I think I got confused, because the Confluence API always returns the field publicName.

Best regards,
Sven

1 Like