You are not logged in.
Pages: 1
hello everyone
Is there an api request to get users list with their profiles (profiles_id,profiles_name)
because using this url :
https: //aw.with7.glpi-network.cloud/apirest.php/user/
I get the field “profiles_id": 0 on all users
Appreciate any help
Offline
Hello,
You can try this url to get User_id and Profil_id : server/apirest.php/Profile_user/ and this one to get the match Profile_id/name : server/apirest.php/Profile
Last edited by keepcool5283 (2021-08-19 21:11:28)
Apps Android GLPI Management : https://play.google.com/store/apps/deta … fr.dmn.app
Site Web : http://mdu-tech.fr/
GLPI 9.5.5 sur IIS 10 / PHP 8 / MySQL
Offline
ty Dumain this really helped me but do you have an idea on how to create a user and set him to a specific profile using api request.
Thanks in advance.
Last edited by aziz (2021-08-20 16:08:30)
Offline
With this POST command :
server/apirest.php/User/id_user/Profile_user/?expand_drodpowns=true&session_token=2aglf27j3r9lrrakfnlhXXXXX
And this payload : {"input": {"users_id": 316,"profiles_id":1,"entities_id":1,"is_recursive":0}}
Apps Android GLPI Management : https://play.google.com/store/apps/deta … fr.dmn.app
Site Web : http://mdu-tech.fr/
GLPI 9.5.5 sur IIS 10 / PHP 8 / MySQL
Offline
appreciate your response but it didn't work for me i get
"ERROR_ITEM_NOT_FOUND",
"Item not found"
Offline
Check if your users_id, profiles_id or entities_id are correct
Last edited by keepcool5283 (2021-08-22 19:51:11)
Apps Android GLPI Management : https://play.google.com/store/apps/deta … fr.dmn.app
Site Web : http://mdu-tech.fr/
GLPI 9.5.5 sur IIS 10 / PHP 8 / MySQL
Offline
If anyone is stuck on this, the capitalisation is important.
The correct url for setting a profile is:
POST server/apirest.php/User/id_user/Profile_User/
Note the capital U in Profile_User. This had me stumped for a while!
Offline
Pages: 1