Hello,
I’m doing some tests with the new V2 API endpoints and I have trouble updating an user using the endpoint api/v2/users-management/users/{id}
.
I followed the Web API documentation, but I can’t make this work in my python project.Context:
The python requests
library, using a Session
object to cache authentication data. The session object has the following configuration:
session.auth = requests.auth.HTTPBasicAuth(sonarqube_token)
session.headers = {"Accept": "application/json", "Content-Type": "application/json"}
Basically, I’m calling
session.request(
method="PATCH",
url=self.configuration.host + "/api/v2/users-management/users/{my_user_id}",
params={},
data={
"name": "New name"
},
timeout=30,
)
Whatever I put in the request body, I’m getting a 415 Client Error
.
Is there something I’m doing wrong ?
Thanks !