REST API User - LocalName versus Label in Profile Fields

Former Member
Former Member

When creating custom profile fields in the Admin console, you specify a Key and a Label.

...

When you get a user via the REST API, it seems like the Label is the same value as the Key (LocalName).  Is that intentional? (in the screencap below, FirstName and LastName are custom).

Parents
  • Former Member
    0 Former Member

    It looks very wrong to me, and doesn't make much sense either.

    In the JSON, LocalName corresponds to the UI's Key with spaces removed, Label is Key and Value is actually Value.  I am not sure why Key is called Label.  LocalName is used for returning REST XML responses.

    When setting up your profile fields, I would recommend making the Key and Label the same value (i.e. First Name).  That is the case for all our OOTB fields.  Then the label returned will match both the label and the key.  That will avoid all confusion and sort of cover up this weirdness.

    I have filed a bug to review this as well.

    TE-15688

  • Former Member
    0 Former Member in reply to Former Member

    Hi , thanks for your response. I did try to set the Key and Label to be the same value when creating the custom field, but the Key property validation rejects spaces. Just FYI.  Thanks!

Reply Children
No Data