Support for add or remove of custom attribute (Type, array) in profile object

The custom attributes of type array in the profile schema do not support add or remove operation. It only supports replace (set) operation.

For example:

I have the profile schema having custom attribute StringArray.

"profile": {
        "firstName": "Pranav",
        "lastName": "Dubey",
        "mobilePhone": null,
        "StringArray": [
            "String1",
            "String2",
            "String3",
            "String4"
        ],
        "secondEmail": null,
        "login": "xyz@xyz.com",
        "email": "xyz@xyz.com"
    },

In the above profile when I try to update using REST service and provide value “String5”, the whole attribute StringArray value is replaced by “String5”.

Is there a way that we can add “String5” instead of replacing.

I am asking it as I do not want to read the user profile and then perform the work of adding and removing natively. It would be good if the REST endpoint can facilitate this.

1 Like

I’m moving this to feature requests.

We may support JSON Patch in the future, which would be the solution to this.

1 Like

Can you post the API call you use to update the string array…just the payload this seems to be the part I can’t get right…

Using:
{

“profile”: {

"proxyAddress": [ “SMTP:tdog@skidmore.edu”, “SMTP:aatest3@skidmore.edu” ]

}

}

I get:
The request body was not well-formed.

Nevermind…the above is correct except a stupid issue with quotes…notice the difference between " and “