question

Gary Weissenbacher avatar image
Gary Weissenbacher asked ·

Using SCIM Api how can I replace the mobile phone number?

curl --request PATCH \  --url https://platform.devtest.ringcentral.com/scim/v2/Users/283100004 \  --header 'accept: application/json' \  --header 'authorization: Bearer xxx' \  --header 'content-type: application/json' \  --data '{"Operations":[{"op":"replace","path":"phoneNumbers/1/mobile","value":"+491713334445"}],"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"]}'

Above is my request, but it does not work because the path variable is set wrong.
As you know the phoneNumbers field is an array of objects, identified by the type. If I want to replace it with a different number, what does the patch operation have to look like?
"phoneNumbers": [ { "value": "+491713334445", "type": "mobile" } ]

scimpatch
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered ·

Here is the sample body:

var body = {
      schemas: ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
      Operations:[
          {
            op:"replace",
            path: "phoneNumbers[type eq \"mobile\"].value",
            value: "+491713334445"
          }
        ]
      }


1 comment
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Gary Weissenbacher avatar image
Gary Weissenbacher answered ·

Perfect, thank you. I could not find the correct syntax for the "path" value.

1 comment
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Work together.
From anywhere.

Team messaging, video meetings
and phone - all in one app.


Get the new RingCentral app