1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-20 15:28:22 +00:00
gns3-server/gns3server/api/routes/controller
Rolf Sommerhalder 6e88d4816f
REST API example needs additional parameter
While try this example with GNS3 branch 3.0 on Ubuntu 20.04 LTS, the API call 
```$ curl http://172.17.46.114:3080/v3/users/authenticate -d '{"username": "admin", "password": "admin"}' ```  fails with ```{"detail":[{"loc":["body"],"msg":"value is not a valid dict","type":"type_error.dict"}]}```.

The additional parameter appended to curl fixes this ```{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTYzMTI4NTc4NX0.kT1dAN4v1vHMTBJO2UaI2I7yAFhnSpBU9iqmdDuwtAQ","token_type":"bearer"} ```
Found after googling for the error above in 
FastAPI 0.65.2 POST request fails with "value is not a valid dict" when using the Requests library; 0.65.1 works (with a caveat) #3373
https://github.com/tiangolo/fastapi/issues/3373#issuecomment-886745123
2021-09-09 17:08:26 +02:00
..
dependencies Check a permission matches an existing route before it is allowed to be created. 2021-08-17 16:14:15 +09:30
__init__.py Symbols endpoints (except upload) don't require authentication. 2021-06-16 20:22:49 +09:30
appliances.py Save/restore appliances Etag. 2021-05-17 00:37:15 +09:30
computes.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
controller.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
drawings.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
gns3vm.py Complete type annotations for API endpoints. 2021-04-18 15:40:38 +09:30
groups.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
links.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
nodes.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
notifications.py Protect controlle notification endpoints. Ref #1888 2021-04-26 16:18:18 +09:30
permissions.py Check if user has the right to add a permission 2021-08-19 14:47:48 +09:30
projects.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
roles.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
snapshots.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
symbols.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
templates.py Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
users.py REST API example needs additional parameter 2021-09-09 17:08:26 +02:00