curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users/1234567890/groups' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"groups": [1, 2, 3]
}'
{
"groups": [
{
"id": 1,
"parentId": null,
"name": "Sales Team",
"usersCount": 15,
"coursesCount": 5,
"image": null,
"attributes": {}
},
{
"id": 2,
"parentId": 1,
"name": "Regional Sales",
"usersCount": 8,
"coursesCount": 3,
"image": null,
"attributes": {}
}
]
}
Add user to groups
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users/1234567890/groups' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"groups": [1, 2, 3]
}'
{
"groups": [
{
"id": 1,
"parentId": null,
"name": "Sales Team",
"usersCount": 15,
"coursesCount": 5,
"image": null,
"attributes": {}
},
{
"id": 2,
"parentId": 1,
"name": "Regional Sales",
"usersCount": 8,
"coursesCount": 3,
"image": null,
"attributes": {}
}
]
}
Show Group properties
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users/1234567890/groups' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"groups": [1, 2, 3]
}'
{
"groups": [
{
"id": 1,
"parentId": null,
"name": "Sales Team",
"usersCount": 15,
"coursesCount": 5,
"image": null,
"attributes": {}
},
{
"id": 2,
"parentId": 1,
"name": "Regional Sales",
"usersCount": 8,
"coursesCount": 3,
"image": null,
"attributes": {}
}
]
}
Was this page helpful?