Create a Group
Create a new group, checking if the group already exists before adding.
POST
/api/scim/v2/Groups
Headers
Key | Value |
---|---|
Accept | application/json |
Authorization | Bearer <API Token> |
Content-Type | application/json |
Request Body
The request body should contain the following parameters:
{
"displayName": "Group Name",
"members": [
{
"value": "user1@example.com",
"display": "User 1"
},
{
"value": "user2@example.com",
"display": "User 2"
}
]
}
Example cURL
curl --location --request POST 'http://localhost:8080/api/scim/v2/Groups' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
"displayName": "Developers",
"members": [
{
"value": 1,
"display": "user1@example.com"
},
{
"value": 2,
"display": "user2@example.com"
}
]
}'
Responses
Status Code | Description | Response |
---|---|---|
200 | Group created successfully | application/json |
400 | Invalid Request | empty |
401 | Unauthorized | empty |
500 | Internal Server Error | empty |
Sample response
200 : Group created successfully
{
"id": "123",
"displayName": "Developers",
"members": [
{
"value": 1,
"display": "user1@example.com"
},
{
"value": 2,
"display": "user2@example.com"
}
],
"meta": {
"location": "http://localhost:8080/api/scim/v2/Groups/123",
"created": "2023-08-04T08:38:02.3732123Z"
}
}