question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[API Rest] Redirecting to /login when doing a POST to /api/v1/database/import/

See original GitHub issue

Hello!

I tried to import a zip file of my databases (previously obtain using the /export route of the API) to my superset server but I keep getting redirected to /login (I tried something with csrf_token but I get the same redirection)

There is may be something I am missing.

Expected results

I expect to be able to see my databases added to my superset server and receive a 200 OK response

Actual results

I am getting a redirection to /login

How to reproduce the bug

I am using this curl:

curl -H “Authorization: Bearer $token” -H ‘accept: application/json’ -H ‘Content-Type: multipart/form-data’ -F “formData=@databases.zip;type=multipart/form-data” -X POST http://localhost:8088/api/v1/database/import/

Note: token is an access_token generate by the route /security/login

  • superset version: 1.3
  • python version: 3.7.9
  • node.js version: 14
  • any feature flags active: “ALERT_REPORTS”: True, “VERSIONED_EXPORT”: True

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
MrAmonixcommented, Aug 4, 2021

thanks here is a screenshot of what I get, it is pretty similar to the above superset_import

2reactions
junlincccommented, Aug 4, 2021

Hi! Thanks for reporting, can you help verify this is still an issue on master? if so, lmk with a screenshot or videos, we will look into it right away 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

[GitHub] [superset] oma-it commented on issue #16030: [API ...
[GitHub] [superset] oma-it commented on issue #16030: [API Rest] Redirecting to /login when doing a POST to /api/v1/database/import/.
Read more >
Superset API IMPORT throw into Login Redirect page #22407
I'm New to Superset, When i try to the import dashboard from API i ended with login page, Some one please throw some...
Read more >
Import dashboard in superset through api - Stack Overflow
As you can see your response is redirecting you to a login page. ... And add header in your request to /api/v1/dashboard/import.
Read more >
REST API for Oracle Commerce Cloud 21A - Redirects REST ...
The Oracle CX Commerce Service REST APIs provide an extensive set of endpoints for configuring and managing your store.
Read more >
Access and authentication for the REST API
The client must create a POST call and pass the user name, password, and authString in the Request headers using the /x-www-form-urlencoded content...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found