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

Reply
  • 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

Children