Trouble in accessing data via Bravado

14 views
Skip to first unread message

Samriddhi Gupta

unread,
Aug 10, 2022, 6:23:24 AM8/10/22
to cBioPortal for Cancer Genomics Discussion Group
Hello,

I am trying to download cBioPortal data programmatically in my Institute's server via bravado. However, it is showing me a HTTP: 302 error. And so I am unable to download the data. Can you please help me in troubleshooting it?

Thank you

Samriddhi

Luke Sikina

unread,
Aug 10, 2022, 8:55:59 AM8/10/22
to cBioPortal for Cancer Genomics Discussion Group

Hi Samriddhi,

I'm unfamiliar with Bravado - if you reply to this thread with more information about that software I might be able to give you better advice. HTTP 302 isn't an error code; it's a redirect. This is probably happening because the server is redirecting you for authentication purposes. There are two ways you can fix this:
  • Quick and dirty: Log into your institute's portal. Copy the JSession ID cookie from any API request your browser sends to the portal, and add it as a header to the requests you send in Bravado. The header looks something like this: cookie: JSESSIONID=9019494FF4C16F46C6AD17A4390D291D This will work temporarily, but every time you're logged out of the portal, that session ID will expire, so it's not a particularly sustainable solution if you need to do this long term.
  • Sustainable: Enable token authentication in your institute's portal. https://docs.cbioportal.org/deployment/authorization-and-authentication/authenticating-users-via-tokens/
Luke
Reply all
Reply to author
Forward
0 new messages