[//]: # (werk v2)
# Rest API: change response codes for some endpoints from 302 to 303
key | value
---------- | ---
date | 2024-07-11T14:48:17+00:00
version | 2.4.0b1
class | fix
edition | cre
component | rest-api
level | 1
compatible | no
Some endpoints accept some data (via POST, PUT), start a background job and then
redirect to other "wait-for-completion" endpoints. The wait-for-completion
endpoints however expected requests with the GET method.
Previously, we used the response code "302 Found" in these cases. Some clients,
like the python requests library, always change the method to GET on redirects,
but this is not according to the spec. As such "correct" clients ran into
issues
so we made the decision to update these endpoints to use "303 See other"
instead. This status code guarantees a change to the GET method.
Affected endpoints:
* Execute service discovery on host
(`/domain-types/service_discovery_run/actions/start/invoke`)
* Rename a host
(`/objects/host_config/example.com/actions/rename/invoke`)
* Activate pending changes
(`/domain-types/activation_run/actions/activate-changes/invoke`)