Why I can't get custom attribute from API

Infos:

  • Used Zammad version: 3.1
  • Used Zammad installation source: package
  • Operating system: Debian
  • Browser + version: Chrome latest

Expected behavior:

  • Get custom user attribute from API

Actual behavior:

  • No custom attribute shown on response

Steps to reproduce the behavior:

  • I’ve created a boolean attribute in user object:

I intend to use API to update this field but I’m not getting its value when searching for zurmo_synced: false. When running User.find(3) on Zammad console for example I get:

But when accessing https://mydomain.com/api/v1/users/3 I get:

Any help would be great!

Thank you.

You had me here for a second.

The reason is, because you’re forbidding your customers, agents and admins to see this field.
The API won’t show this field, because it’s accessing the data sets as the user you’re referencing.

Please note that rails console and API might differ in usuage and (even more important) on what you see.

Allow either agents or admins (depending on what role your API user does have) to view the field and you should be fine.

Oh thank you! I was assuming that the view config was related to UI only! I will check it out!

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.