musicmuthu opened a new issue, #22407:
URL: https://github.com/apache/superset/issues/22407

   Hi All,
   I'm New to Superset, When i try to the import dashboard from API i ended 
with login page,
   Some one please throw some light on this issue.
   Superset version is 2.0.0
   
   #GET ACCESS_TOKEN
   access_token=$( curl -X 'POST'    
'http://localhost:8080/api/v1/security/login'   -H 'accept: application/json'   
-H 'Content-Type: application/json'   -d '{   "password": "admin",   "refresh": 
false,   "provider": "db",   "username": "admin" }' --insecure  | jq -r 
'.access_token')
   
   echo $access_token
   
   #GET CSRFToken
   
   csrf_token=$(curl "http://loclhost:8080/api/v1/security/csrf_token/"; -H 
"Authorization: Bearer $access_token" | jq -r '.result')
   echo $csrf_token
   
   #IMPORT DASHBOARD
   
   curl -X 'POST' 'http://localhost:8080/api/v1/dashboard/import' -H 
"Authorization: Bearer $access_token" -H "X-CSRFToken: $csrf_token" --form 
"formData='/home/armdo/1.zip'" --form "overwrite=true" --insecure
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
   <title>Redirecting...</title>
   <h1>Redirecting...</h1>
   <p>You should be redirected automatically to target URL: <a 
href="http://localhost:8080/api/v1/dashboard/import/";>http://localhost:8080/api/v1/dashboard/import/</a>.
 If not click the link. 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to