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 2022-09-19 14:53:59

mrvls
Member
Registered: 2020-10-03
Posts: 18

ticket_user = 400 Bad Request

Hello everyone,

I had this working for a while to get (then remove) ticket's actors :
$ticket_users = Invoke-RestMethod -Uri "$($AppURL)/Ticket/$($ticketNumber)/ticket_user" -Headers @{"session-token"=$SessionToken.session_token;"App-Token" = "$AppToken"} -ContentType "application/json" -Method get

Now it seems like "ticket_user" is not used anymore, since we moved from 9.4.4 to 10.0.0.3.
I read some CommonITILActor, which actually doesn't give me a 400 Bad Request but doesn't show anything either.

If there is a documentation about this update I would gladly take it.

Offline

#2 2022-09-19 15:37:12

mrvls
Member
Registered: 2020-10-03
Posts: 18

Re: ticket_user = 400 Bad Request

Ok, so Ticket_User instead of ticket_user apparently did the trick...

Offline

#3 2022-09-22 01:25:34

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: ticket_user = 400 Bad Request

The API is case sensitive when it comes to the item type names. The case must match as it is in the code file names (the files in the src folder).

There is a new API implementation that is less strict and easier to use in the works. You can track its development here:
https://github.com/glpi-project/glpi/pull/12221

It is currently planned to be included in the 10.1.0 release (No ETA yet).


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

Board footer

Powered by FluxBB