Modify Group Membership

HTTP Request Method

PATCH

URI

https://hs-identity-api.oracleindustry.com/scim/v1/<tenant>/Groups/{groupname}

Request schema URI

JSON PATCH format

Response schema URI

urn:scim:schemas:core:2.0:Group

HTTP Response Codes

The following response codes apply:

  • 200
  • 401
  • 403
  • 404
  • 412

For more information, see Return Codes.

Sample Message Exchange — Add users to a group

Request

PATCH /scim/v1/mypharma/Groups/mypharma.lhsdme HTTP 1.1
Host: example.com
Authorization: Basic Y3VzdG9tZXIuYWRtaW51c2VyOnBhc3N3b3Jk=
Accept: application/json
Content-Type: application/json
Content-Length: ...
{
   "op":"add",
   "path":"members",
    "value":[
        {  "value": "2819c2237f76453a919d413861904646" },
        {  "value": "c68580ea3b82486a969b2b801ffd2aa8" }
    ]
}

Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: ...
{
    "schemas" : [
        "urn:scim:schemas:core:2.0:Group"
    ],
    "id" : "mypharma.lshdme",
    "displayName" : "lshdme",
    "members" : [
        {
            "value" : "82be808061044f9e9cef4c8f08d53ef0",
            "display" : "tony.stark",
            "$ref" : "https://hs-identity-api.oracleindustry.com/scim/v1/mypharma/Users/82be808061044f9e9cef4c8f08d53ef0"
        },
        {
            "value" : "2819c2237f76453a919d413861904646",
            "display" : "mjack635375460126150000",
            "$ref" : "https://hs-identity-api.oracleindustry.com/scim/v1/mypharma/Users/8a0722126d914a5faa3d18ab806d2310"
        },
        {
            "value" : " c68580ea3b82486a969b2b801ffd2aa8",
            "display" : "user123abc456id",
            "$ref" : "https://hs-identity-api.oracleindustry.com/scim/v1/mypharma/Users/47af6c8070c54eb4bfcf60554e582ac1"
        }
    ],
    "meta" : {
        "created" : "2014-06-01T14:22:38Z",
        "resourceType" : "Group"
    }
}

Sample Message Exchange — Remove users from a group

Request

PATCH /scim/v1/mypharma/Groups/mypharma.lhsdme HTTP 1.1
Host: example.com
Authorization: Basic Y3VzdG9tZXIuYWRtaW51c2VyOnBhc3N3b3Jk=
Accept: application/json
Content-Type: application/json
Content-Length: ...

Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: ...
{
    "schemas" : [
        "urn:scim:schemas:core:2.0:Group"
    ],
    "id" : "mypharma.lshdme",
    "displayName" : "lshdme",
    "members" : [
        {
            "value" : "82be808061044f9e9cef4c8f08d53ef0",
            "display" : "tony.stark",
            "$ref" : "https://hs-identity-api.oracleindustry.com/scim/v1/mypharma/Users/82be808061044f9e9cef4c8f08d53ef0"
        }
    ],
    "meta" : {
        "created" : "2014-06-01T14:22:38Z",
        "resourceType" : "Group"
    }
}

Sample Message Exchange — Remove all users from a group

Request

PATCH /scim/v1/mypharma/Groups/mypharma.lhsdme HTTP 1.1
Host: example.com
Authorization: Basic Y3VzdG9tZXIuYWRtaW51c2VyOnBhc3N3b3Jk=
Accept: application/json
Content-Type: application/json
Content-Length: ...
{
   "op":"remove",
   "path":"members"
}

Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: ...
{
    "schemas" : [
        "urn:scim:schemas:core:2.0:Group"
    ],
    "id" : "mypharma.lshdme",
    "displayName" : "lshdme",
    "members" : [  ],
    "meta" : {
        "created" : "2014-06-01T14:22:38Z",
        "resourceType" : "Group"
    }
}