Skip to main content

SCIM Entity Group examples

Operations

This page shows the operations that can be performed for the Entity Group object.

List all

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/EntityGroup
Response 200 OK
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 3,
    "startIndex": 1,
    "Resources": [
        {
            "meta": {
                "location": "http://demolab.soffid.pat.lab:8080/soffid/webservice/scim2/v1/EntityGroup/5462422",
                "resourceType": "EntityGroup"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.addons.federation.common.EntityGroup"
            ],
            "name": "test-demoIdP",
            "id": 5462422
        },
        {
            "meta": {
                "location": "http://demolab.soffid.pat.lab:8080/soffid/webservice/scim2/v1/EntityGroup/6725679",
                "resourceType": "EntityGroup"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.addons.federation.common.EntityGroup"
            ],
            "name": "Soffid",
            "id": 6725679
        },
        {
            "metadataUrl": "test-2",
            "meta": {
                "location": "http://demolab.soffid.pat.lab:8080/soffid/webservice/scim2/v1/EntityGroup/6780683",
                "resourceType": "EntityGroup"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.addons.federation.common.EntityGroup"
            ],
            "name": "test-2",
            "id": 6780683
        }
    ]
}

List by filter

List all entity groups with a filter expression.

It is allowed to use pagination and sort the information, for more information visit the Sorting and Pagination information.

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/EntityGroup?filter=name co "test"
Response 200 OK
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 3,
    "startIndex": 1,
    "Resources": [
        {
            "meta": {
                "location": "http://demolab.soffid.pat.lab:8080/soffid/webservice/scim2/v1/EntityGroup/5462422",
                "resourceType": "EntityGroup"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.addons.federation.common.EntityGroup"
            ],
            "name": "test-demoIdP",
            "id": 5462422
        },
        {
            "meta": {
                "location": "http://demolab.soffid.pat.lab:8080/soffid/webservice/scim2/v1/EntityGroup/6725679",
                "resourceType": "EntityGroup"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.addons.federation.common.EntityGroup"
            ],
            "name": "Soffid",
            "id": 6725679
        },
        {
            "metadataUrl": "test-2",
            "meta": {
                "location": "http://demolab.soffid.pat.lab:8080/soffid/webservice/scim2/v1/EntityGroup/6780683",
                "resourceType": "EntityGroup"
            },
            "schemas": [
                "urn:soffid:com.soffid.iam.addons.federation.common.EntityGroup"
            ],
            "name": "test-2",
            "id": 6780683
        }
    ]
}

Query by id

Query an entity group by its id (primary key). 

Request
GET http://<your-domain>/soffid/webservice/scim2/v1/EntityGroup/5462422
Response 200 OK
{
    "meta": {
        "location": "http://demolab.soffid.pat.lab:8080/soffid/webservice/scim2/v1/EntityGroup/5462422",
        "resourceType": "EntityGroup"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.addons.federation.common.EntityGroup"
    ],
    "name": "test-demoIdP",
    "id": 5462422
}

Create

Request

POST http://<your-domain>/soffid/webservice/scim2/v1/EntityGroup

JSON

 {
    "metadataUrl": "test-3",
    "name": "test-3"
}
Response 201 Created
{
    "metadataUrl": "test-3",
    "meta": {
        "location": "http://demolab.soffid.pat.lab:8080/soffid/webservice/scim2/v1/EntityGroup/6780695",
        "resourceType": "EntityGroup"
    },
    "schemas": [
        "urn:soffid:com.soffid.iam.addons.federation.common.EntityGroup"
    ],
    "name": "test-3",
    "id": 6780695
}

Update partial

Only attributes with changes will be updated, the others will maintain the same value.

Request
PATCH http://<your-domain>/soffid/webservice/scim2/v1/EntityGroup/6780695

JSON

{
    "Operations": [
        {
            "op": "replace",
            "path": "lastName",
            "value": "Casey"
        },
        {
            "op": "replace",
            "path": "middleName",
            "value": "XX"
        }
    ]
}
Response 200 OK
{
    "lastName": "Casey",
    "profileServer": "null",
    "createdByUser": "admin",
    "fullName": "Casey Casey XX",
    "active": true,
    "userName": "ckelp",
    "mailAlias": "",
    "mailServer": "null",
    "firstName": "Casey",
    "createdDate": "2021-05-11 09:06:49",
    "multiSession": false,
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/User/1976665",
        "links": {
            "roleAccounts": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=userCode+eq+'ckelp'+and+enabled+eq+true",
            "groupUsers": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/GroupUser?filter=user+eq+'ckelp'+and+disabled+eq+false",
            "accounts": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Account?filter=type+eq+U+and+users.user.userName+eq+'ckelp'"
        },
        "resourceType": "User"
    },
    "modifiedByUser": "admin",
    "schemas": [
        "urn:soffid:com.soffid.iam.api.User"
    ],
    "modifiedDate": "2021-05-11 09:33:35",
    "middleName": "XX",
    "attributes": {},
    "id": 1976665,
    "userType": "I",
    "homeServer": "null",
    "primaryGroupDescription": "World Original",
    "primaryGroup": "world"
}

Update all

This operation replaces all values in the user.

  • Note that the attribute id is required to confirm that the resource "...User/<id>" is the same that the JSON user.
  • Note that all the attributes not included in the request will be cleared in the user and their data will be lost.
  • Note that not all the attributes are updatable, for example tag meta, avoid these tags. For more information see Resource data model page
Request
PUT http://<your-domain>/soffid/webservice/scim2/v1/Role/1976590

JSON

{
    "schemas": [
        "urn:soffid:com.soffid.iam.api.User"
    ],
    "id": 1976665,
    "userName": "ckelp",
    "firstName": "Casey",
    "lastName": "Kelp",
    "userType": "I",
    "primaryGroup": "world",
    "homeServer": "null",
    "mailServer": "null",
    "profileServer": "null",
    "active": true
}
Response 200 OK
{
    "lastName": "Kelp",
    "profileServer": "null",
    "createdByUser": "admin",
    "fullName": "Casey Kelp",
    "active": true,
    "userName": "ckelp",
    "mailAlias": "",
    "mailServer": "null",
    "firstName": "Casey",
    "createdDate": "2021-05-11 09:06:49",
    "multiSession": false,
    "meta": {
        "location": "http://soffid.pat.lab:8080/webservice/scim2/v1/User/1976665",
        "links": {
            "roleAccounts": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=userCode+eq+'ckelp'+and+enabled+eq+true",
            "groupUsers": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/GroupUser?filter=user+eq+'ckelp'+and+disabled+eq+false",
            "accounts": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Account?filter=type+eq+U+and+users.user.userName+eq+'ckelp'"
        },
        "resourceType": "User"
    },
    "modifiedByUser": "admin",
    "schemas": [
        "urn:soffid:com.soffid.iam.api.User"
    ],
    "modifiedDate": "2021-05-11 09:35:24",
    "attributes": {},
    "id": 1976665,
    "userType": "I",
    "homeServer": "null",
    "primaryGroupDescription": "World Original",
    "primaryGroup": "world"
}

Delete

Please note after this delete, the user has to be created again to use it in the next examples.

Request
DELETE http://<your-omain>/soffid/webservice/scim2/v1/User/1976665
Response 204 No Content
204 No Content

Error response

For more information about error response visit https://bookstack.soffid.com/link/116#bkmrk-error-response