I am trying to modify a parameter (e.g. configuration parameter) of a running (or finished) build named 'lock' and want to insert the value: "true".
My initial thought was to send a rest api call with a service message which sets the parameter.
response = requests.post(f"{teamcity_build_api_endpoint}/id:{build_id}/log", headers=header_text_plain, data="##teamcity[setParameter name='lock' value='true']")
Even though, this is not throwing any exceptions it also does not modify the parameter.
What am I doing wrong? Is this even possible to alter parameters via rest api?
Background information:
What I need is a shared parameter for a couple of builds which are triggered from an initial one. The triggered builds should report their result into a parameter. For that reason I wanted to introduce a lock mechanism so that only one triggered build can change the parameter at the time.