Announcement

Collapse
No announcement yet.

Role Permissions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Role Permissions

    Hi everyone!

    I would like to enable only certain fields of entities for an API access, i.e. Contact: firstname, lastname.

    I thought I could do this via Role > Field Level Security > Contact: firstname & lastname (read: yes)

    I tried to access via API:

    $crm_data = $client->request('GET', 'Contact', [
    'select' => 'firstName,lastName'
    ]);

    But unfortunately, this does not work.

    Only when I also allow 'read all' under Scope Level > Contact, the API call works. But then all fields can be accessed.

    But if I only want firstname & lastname to be accessible, do I have to manually prohibit all other fields (over 90) atField Level Security, or is there a better solution?

    Many thanks in advance,
    Stefan

  • #2
    Hi,

    Yes. You need to add all fields. It v8.2 there will be the ability to add multiple fields at once.

    If it's only for API usage, you can write your own API endpoint that will return only needed data.

    Comment


    • #3
      Alright, thank you yuri!

      Comment

      Working...
      X