Announcement

Collapse
No announcement yet.

CRUD API GET Returns Fields I dont want

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

  • CRUD API GET Returns Fields I dont want

    I'm trying to only return the Lead (id) number and Lead (status) field on a GET.
    I read about the roles so disallowed all the fields apart from id and status in Leads.
    All others in Roles are disabled and the permissions at the top of the roles are set to no
    My issue is that it still returns "deleted" and "isFollowed".
    So I receive:
    {
    "id": "661c2d62a8b0702e1",
    "deleted": false,
    "status": "Dead",
    "isFollowed": false
    }

    These two fields are not in the Leads that I can set to no.
    Does anyone know what I need to do so that "deleted" and "isFollowed" don't show/return on my GET?​

  • #2
    You can specify with select param which fields should be returned. Here you have an example: demo.eu.espocrm.com/api/v1/Opportunity?select=amountCurrency%2Camount%2Cclose Date%2CassignedUserId%2CassignedUserName%2Cstage%2 CaccountId%2CaccountName%2Cname&maxSize=20&offset= 0&orderBy=createdAt&order=desc

    Comment


    • #3
      Thanks for the reply, however, when i post a GET with...../api/v1/Lead/661c2d62a8b0702e1?select=status
      I still get the unwanted fields back
      {
      "id": "661c2d62a8b0702e1",
      "deleted": false,
      "status": "Dead",
      "isFollowed": false
      }​

      Comment


      • #4
        It's not possible. You can create your own API entry point if it's really important for your case. But I'd recommend just leave it as it is.

        Comment

        Working...
        X