clearer instructions in the Swagger API Docs how to set the CSRF token
See original GitHub issueMotivation
I’ve been trying to get started with a basic empty apache superset… and add a single data source (Postgresql). So far I accidentally started wiring it via superset -set-database-uri
which I later learned will change my apache supersets backend… not start examining my data… no problem I start switching to the REST api… but then I get stuck on the create database step because of CSRF
Proposed Change
On the Swagger API docs (and perhaps the part around superset -set-database-uri
make it cleaer what we’re doing with databases… even just a simple prompt in the superset --help
telling me to go examine the REST api can clue me in … in places where I should not be trying to use the CLI
New or Changed Public Interfaces
In the Swagger Docs I just need to know where or how to set the CSRF token… I am almost there but… just not sure where FLASK is expecting to find the CSRF token… so I just get constant 400 errors when trying to create my first DB
Traceback (most recent call last):
File "/scratch.py", line 96, in <module>
response = create_db_connection(jwt_token=bearer_tokens['access_token'], db_ip=db_host, db_port=db_port, username=db_user, password=db_password, db_name=db_name)
File "/scratch.py", line 43, in create_db_connection
response.raise_for_status()
File "/home/emcp/anaconda3/envs//lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: BAD REQUEST for url: http://someip:8088/api/v1/database/
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top GitHub Comments
closing this for now as it seems the core issue is resolved
Closing issue is okay from my side…
I now have a working JSON to pass which seems to get a good test connection on POSTGresQL
i got a 400 trying to nest another JSON object for default parameters… and when I tried to pass a blank one it gave a 500