You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/08/01 22:25:42 UTC

[GitHub] [superset] EMCP edited a comment on issue #16003: clearer instructions in the Swagger API Docs how to set the CSRF token

EMCP edited a comment on issue #16003:
URL: https://github.com/apache/superset/issues/16003#issuecomment-890596106


   After I created the connection seems to be unhappy.. I am diffing it with a connection I made manually.. seems I need to make sure to add certain things like
   
   ```
   {
       "metadata_params": {},
       "engine_params": {},
       "metadata_cache_timeout": {},
       "schemas_allowed_for_csv_upload": []
   }
   
   ```
   
   in the extras section
   
   I probably need to also handle the response object better.. getting response after creation as 
   
   ```
   scratch.py
   Traceback (most recent call last):
     File "/scratch.py", line 73, in <module>
       create_response = create_db_connection(session, bearer_token=json.loads(response.text)['access_token'], csrf_token=json.loads(csrf_response.text)['result'], db_ip=db_host, db_port=db_port, db_user=db_user, db_pass=db_password, db_name=db_name)
     File "/scratch.py", line 36, 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: 422 Client Error: UNPROCESSABLE ENTITY for url: http://SOMEIP:8088/api/v1/database/
   
   Process finished with exit code 1
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org