ich habe ein Problem mit dem Laborbuch elabftw:
Ich kann den Titel, Kommentare und den Body ändern, aber keine Tags wählen oder neu erzeugen.
Hier ändern ich den Titel und es funktioniert:
Code: Alles auswählen
import elabapi_python
from elabapi_python.rest import ApiException
#########################
# CONFIG #
#########################
API_HOST_URL = 'https://elab.local:3148/api/v2'
API_KEY = 'a2ca4231a0a834ed30c19be8'
#########################
# END CONFIG #
#########################
# Configure the api client
configuration = elabapi_python.Configuration()
configuration.api_key['api_key'] = API_KEY
configuration.api_key_prefix['api_key'] = 'Authorization'
configuration.host = API_HOST_URL
configuration.debug = False
configuration.verify_ssl = False
api_client = elabapi_python.ApiClient(configuration)
api_client.set_default_header(header_name='Authorization', header_value=API_KEY)
experimentsApi = elabapi_python.ExperimentsApi(api_client)
elab_id=407
data = { 'title': 'test FM1' }
response = experimentsApi.patch_experiment(elab_id, body=data)
Code: Alles auswählen
data = { 'title': 'test ' , 'tags':'versuch' }
ApiException: (400)
Reason: Bad Request
Kann mir jemand weiterhelfen?