-
Notifications
You must be signed in to change notification settings - Fork 3
Description
First of, creating an eLabFTW experiment should ask for "Your eLabFTW API key" not "Your eLabFTW token" as that is what the API key is called in eLabFTW where you create it.
We tried creating an experiment and also "getting Tags" in the same pop-up window.
Both times we see the error "Failed to .... maybe wrong URL or token"
Both eLabFTW and Adamant run in the same Uni network and should be reachable from both sides. At least for LEO it works, which is set up in the same way as Adamant, network connection wise.
A docker logs adamant-api-l in the VM gets us logs like this:
2025-05-21 10:19:41,479] ERROR in app: Exception on /api/get_tags [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 271, in error_router
return original_handler(e)
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/app/api.py", line 122, in get_tags
all_tags = manager.get_tags()
File "/usr/local/lib/python3.8/site-packages/elabapy/Manager.py", line 65, in get_tags
return self.send_req("tags/")
File "/usr/local/lib/python3.8/site-packages/elabapy/baseapi.py", line 84, in send_req
req.raise_for_status()
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://elab.uni-muenster.de/api/v1/tags/
[2025-05-21 10:19:50,683] ERROR in app: Exception on /api/create_experiment [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 271, in error_router
return original_handler(e)
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/app/api.py", line 147, in create_experiment
response = manager.create_experiment()
File "/usr/local/lib/python3.8/site-packages/elabapy/Manager.py", line 13, in create_experiment
return self.send_req("experiments", verb='POST')
File "/usr/local/lib/python3.8/site-packages/elabapy/baseapi.py", line 84, in send_req
req.raise_for_status()
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://elab.uni-muenster.de/api/v1/experiments
Do you have any ideas where to start debugging this?
And maybe related to this:
Is there support for other ELNs planned if the API calls can be standardized, or the target ELN selected via a dropdown menu?