SCIM Group examples
Operations
This page shows the operations that can be performed for the group object.
List all
Request
GET http://<your-domain>/soffid/webservice/scim2/v1/Group
Response 200 OK
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults": 7,
"startIndex": 1,
"Resources": [
{
"organizational": false,
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Group/83",
"links": {
"members": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/User?filter=primaryGroup+eq+'world'+or secondaryGroup.group.name+eq+'world'",
"administrators": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=group.name+eq+'world'"
},
"resourceType": "Group"
},
"quota": "0",
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "world",
"obsolete": false,
"description": "World Original",
"attributes": {},
"id": 83
},
{
"organizational": false,
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Group/87",
"links": {
"members": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/User?filter=primaryGroup+eq+'enterprise'+or secondaryGroup.group.name+eq+'enterprise'",
"administrators": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=group.name+eq+'enterprise'"
},
"resourceType": "Group"
},
"quota": "0",
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "enterprise",
"obsolete": false,
"description": "Enterprise",
"parentGroup": "world",
"attributes": {},
"id": 87
},
......
]
}
List by filter
List all 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/Group?filter=name co world
Response 200 OK
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults": 2,
"startIndex": 1,
"Resources": [
{
"organizational": false,
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Group/83",
"links": {
"members": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/User?filter=primaryGroup+eq+'world'+or secondaryGroup.group.name+eq+'world'",
"administrators": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=group.name+eq+'world'"
},
"resourceType": "Group"
},
"quota": "0",
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "world",
"obsolete": false,
"description": "World Original",
"attributes": {},
"id": 83
},
{
"organizational": false,
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Group/485118",
"links": {
"members": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/User?filter=primaryGroup+eq+'world2'+or secondaryGroup.group.name+eq+'world2'",
"administrators": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=group.name+eq+'world2'"
},
"resourceType": "Group"
},
"quota": "0",
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "world2",
"obsolete": false,
"description": "World Modified",
"attributes": {},
"id": 485118
}
]
}
Query by id
Retrieve a group by its id (primary key).
Request
GET http://<your-domain>/soffid/webservice/scim2/v1/Group/83
Response 200 OK
{
"organizational": false,
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Group/83",
"links": {
"members": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/User?filter=primaryGroup+eq+'world'+or secondaryGroup.group.name+eq+'world'",
"administrators": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=group.name+eq+'world'"
},
"resourceType": "Group"
},
"quota": "0",
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "world",
"obsolete": false,
"description": "World Original",
"attributes": {},
"id": 83
}
Create
Request
POST http://<your-domain>/soffid/webservice/scim2/v1/Group/
JSON
{
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "EngineeringTeam",
"description": "Enterprise engineering team",
"parentGroup": "world"
}
Response Response 201 Created
{
"organizational": false,
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Group/1976559",
"resourceType": "Group"
},
"quota": "0",
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "EngineeringTeam",
"obsolete": false,
"description": "Enterprise engineering team",
"parentGroup": "world",
"attributes": {},
"id": 1976559
}
Update partial
Only attributes with changes will be updated, the other will maintain the same value.
If you want to add users to a group, please visit SCIM GroupUser examples page
Request
PATCH http://<your-domain>/soffid/webservice/scim2/v1/Group/1976559
JSON
{
"Operations": [
{
"op": "replace",
"path": "description",
"value": "Enterprise Engineering Group"
},
{
"op": "replace",
"path": "type",
"value": "CC"
}
]
}
Response 200 OK
{
"organizational": false,
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Group/1976559",
"links": {
"members": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/User?filter=primaryGroup+eq+'EngineeringTeam'+or secondaryGroup.group.name+eq+'EngineeringTeam'",
"administrators": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=group.name+eq+'EngineeringTeam'"
},
"resourceType": "Group"
},
"quota": "0",
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "EngineeringTeam",
"obsolete": false,
"description": "Enterprise Engineering Group",
"parentGroup": "world",
"attributes": {},
"id": 1976559,
"type": "CC"
}
Update all
This operation replaces all values in the group.
- Note that the attribute id is required to confirm that the resource "...Group/<id>" is the same that the JSON group.
- Note that all the attributes not included in the request will be cleared in the group 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
page..
Request
PUT http://<your-domain>/soffid/webservice/scim2/v1/Group/1976559
JSON
{
"schemas": ["urn:soffid:com.soffid.iam.api.Group"],
"id": 1976559,
"name": "EngineeringTeam",
"description": "Enterprise engineering team",
"parentGroup": "world"
}
Response 200 OK
{
"organizational": false,
"meta": {
"location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/Group/1976559",
"links": {
"members": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/User?filter=primaryGroup+eq+'EngineeringTeam'+or secondaryGroup.group.name+eq+'EngineeringTeam'",
"administrators": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/RoleAccount?filter=group.name+eq+'EngineeringTeam'"
},
"resourceType": "Group"
},
"quota": "0",
"schemas": [
"urn:soffid:com.soffid.iam.api.Group"
],
"name": "EngineeringTeam",
"obsolete": false,
"description": "Enterprise engineering team",
"parentGroup": "world",
"attributes": {},
"id": 1976559
}
Delete
Please note that after this delete action, you will need to create again the group to use it in the next examples.
Request
DELETE http://<your-domain>/soffid/webservice/scim2/v1/Group/1976559
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