Michael Serres
11/03/2022, 3:45 PMMichael Serres
11/04/2022, 7:52 AMPeter Plochan
11/04/2022, 4:47 PMadminGroup
. Follow the next cURL commands to do so:
• first, GET the user with its user groups
curl -H "Authorization: Bearer $YOUR_API_TOKEN" https://<your-domain>.<http://cloud.gooddata.com/api/v1/entities/users/e74035f6-e1d2-49ca-8e1a-0f319314daec?include=userGroups|cloud.gooddata.com/api/v1/entities/users/e74035f6-e1d2-49ca-8e1a-0f319314daec?include=userGroups>
• you’ll get something like this
{
"data": {
"id": "e74035f6-e1d2-49ca-8e1a-0f319314daec",
"type": "user",
"attributes": {
"authenticationId": "<users-authentication-id>" !!! needs to be copied to the next request
},
"relationships": {
"userGroups": {
"data": [{
"id": "adminGroup", !!! this group needs to be removed
"type": "userGroup"
}] }
}
},
"included": [...], # not needed for the next request
"links": {...} # not needed for the next request
}
• call the PUT for the particular user
curl -X PUT \
-H "Authorization: Bearer $YOUR_API_TOKEN" \
-H "Content-Type: application/vnd.gooddata.api+json" \
-d "@data.json" \
https://<your-domain>.<http://cloud.gooddata.com/api/v1/entities/users/e74035f6-e1d2-49ca-8e1a-0f319314daec|cloud.gooddata.com/api/v1/entities/users/e74035f6-e1d2-49ca-8e1a-0f319314daec>
• … where data.json
will contain following body
{
"data": {
"id": "e74035f6-e1d2-49ca-8e1a-0f319314daec",
"type": "user",
"attributes": {
"authenticationId": "<users-authentication-id>" !!! copied from previous request
},
"relationships": {
"userGroups": {
"data": []
}
}
}
}
Please, do not forget to copy and paste the authenticationId
field into the PUT request, otherwise the user will not be able login to the GD Cloud platform.
Sorry for inconveniences, we will try to improve this experience soon.Michael Serres
11/04/2022, 5:15 PM