Page 1 of 1

Bug in REST API - 02281004

Posted: Fri Jul 01, 2016 7:44 pm
by max_max_mir
For entity CorporateUser, the field loginRestrictions shows as type SCALAR, but the dataType is also LoginRestrictions, which doesn't seem right to me. It looks like this is a COMPOSITE data type. Can someone clarify?

Code: Select all

{u'confidential': False,
              u'dataType': u'LoginRestrictions',
              u'hideFromSearch': False,
              u'label': u'Login Restrictions',
              u'name': u'loginRestrictions',
              u'type': u'SCALAR'},

Code: Select all

u'loginRestrictions': {u'ipAddress': None,
                                  u'timeEnd': None,
                                  u'timeStart': None,
                                  u'weekDays': [u'SUN',
                                                u'MON',
                                                u'TUE',
                                                u'WED',
                                                u'THU',
                                                u'FRI',
                                                u'SAT']},
                                             

Re: Bug in REST API

Posted: Tue Jul 05, 2016 9:53 am
by s.hayes
Hello,
The reason why this is referenced as SCALAR is because all of the fields are lumped as 1 when getting pulled from the API. By Design it functions as 1 field even though you have to set a few values within the Login Restrictions data type.

Re: Bug in REST API - 02281004

Posted: Wed Jul 06, 2016 4:46 pm
by max_max_mir
Thanks Sean - should the documentation be updated to include the "LoginRestrictions" as a datatype? This is the only instance where it is a non-standard datatype.

Re: Bug in REST API - 02281004

Posted: Wed Jul 06, 2016 6:51 pm
by s.hayes
Hey Max,
I spoke to our Engineering Team about this and have confirmed this is not a typo in the documentation. Even though there are a few different parameters to update when looking at the LoginRestrictions, this is looked at like it is all 1 field in the API. The CorporateUser structure is a little different from the other entities and the LoginRestrictions in particular are built this way. However, I will circle back with some other members of my team and discuss this internally as well to see if we should update the documentation in a way that is a little more clear and explains this field in more detail. Thank you for your input here.

Re: Bug in REST API - 02281004

Posted: Tue Aug 16, 2016 4:42 pm
by max_max_mir
Thanks Sean. I think this needs to be changed to COMPOSITE type, just like Address. I see no difference between loginRestrictions and address, since they both represent 1 entity, but have additional elements.