You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the API configuration with "Enable login with external token" and when try to send a satisfaction using API.
We get a 05 Method Not Allowed.
The GET method works to retrive the Satisfaction for the ticket.
Relevant log output
Client error: `PUT https://glpitest.fr/TicketSatisfaction/5/` resulted in a `405 Method Not Allowed` response:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>405 Method Not Allowed</title></head><body><h1> (truncated...)
Page URL
No response
Steps To reproduce
Step to reproduce :
Enable the internal satisfaction.
Create a ticket
Set solution and approuve it to set ticket in Closed status
Use the API to get the Satisfaction survey :
`
$this->connect($instance);
$response = $this->getClient($instance)->request('GET', 'Ticket/' . $ticket .'/TicketSatisfaction/',
[ 'headers' => $this->getHeaders($instance, 'application/json') ]
);
Code of Conduct
Is there an existing issue for this?
Version
GLPI 10.0.6
Bug description
We have the API configuration with "Enable login with external token" and when try to send a satisfaction using API.
We get a 05 Method Not Allowed.
The GET method works to retrive the Satisfaction for the ticket.
Relevant log output
Page URL
No response
Steps To reproduce
Step to reproduce :
Use the API to get the Satisfaction survey :
`
$this->connect($instance);
$response = $this->getClient($instance)->request('GET', 'Ticket/' . $ticket .'/TicketSatisfaction/',
[ 'headers' => $this->getHeaders($instance, 'application/json') ]
);
$satisfactionData = json_decode($response->getBody());
// Prepare the data
$data = [
'tickets_id' => $ticket,
'satisfaction' => $satisfaction,
'comment' => $comment
];
// Send the satisfaction
$this->connect($instance);
$response = $this->getClient($instance)->request('PUT', '/TicketSatisfaction/' . $satisfactionData[0]->id . '/',
[
'headers' => $this->getHeaders($instance,'application/json'),
'json' => [ 'input' => $data ],
]
);
// Display the return
dd(json_decode($response->getBody()));
`
When run the code with all correct data to use the API Rest we get an error.
Your GLPI setup information
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: