You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2019-06-27 20:42:34

cless
Member
Registered: 2019-06-27
Posts: 6

GLPI 9.3.3 API. How can I get another user's data (for example, Name)?

Hello!

First of all, sorry for my poor English.

I am writing a program using GLPI API.
Program log in to GLPI over API using login/pass of ordinary user, let's call him "Bob" (Bob has "Simplified interface" in his Profile).

Next:

- Bob create ticket and get data of this ticket
- Bob want to know Who left Followup in his ticket
- Bob get Followups over API with path "x.x.x.x/apirest.php/Ticket/1496/TicketFollowup":
   <...>
   {
    "id": 2256,
    "tickets_id": 1496,
    "date": "2019-06-03 00:51:29",
    "users_id": 6,
    "users_id_editor": 0,
    "content": "It's a followup #1!",
   <...>
   }
- Now Bob know ID of user ("users_id": 6), who left Followup, BUT!
- When Bob want to get user's ("users_id": 6) Firstname using API and path "x.x.x.x/apirest.php/User/6", he get an ERROR:
   ['ERROR_RIGHT_MISSING', <...>]

It's because Bob has "Simplified interface" in his Profile. With this interface in Profile it's impossible to get data of another User. Also impossible to give him "Administration - Users - Read" Rights (No such tab in "Simplified interface")
I can give to Bob Profile with "Standart interface" and "Administration - Users - Read" Rights.
But then he will have Full web interface with many details and tab "Administration - Users". I don't want it.
I need user with "Simplified interface" and with rights to get user's data.

Maybe it's possible to get user's data in tickets not with path "x.x.x.x/apirest.php/User/6" ?
After all, in tickets of the web interface user can see the Firstname and Secondname of other user even if he has "Simplified interface".
So why user (with "Simplified interface") can't view Firstname and Secondname of other user over API.

Thank you!

Offline

#2 2019-07-01 21:15:24

cless
Member
Registered: 2019-06-27
Posts: 6

Re: GLPI 9.3.3 API. How can I get another user's data (for example, Name)?

Anyone?

Offline

Board footer

Powered by FluxBB