cancel
Showing results for 
Search instead for 
Did you mean: 

How to login and retrive the opendocument information

pmankar
Explorer
0 Kudos

I have a url that shows a cell value

http://<serverName>:<portNo>/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=<iDocID>&...;

which when used in browser prompts for login. After login I am able to see a particular block (a cell) from the last instance of the report. This part works perfectly fine for me.

What I would like to achieve is to do the similar stuff with any scripting language (ex: python).

I know the steps:

  1. Get the JSESSIONID
  2. Set JSESSIONID in cookie and set the parameters, and make a new request.
  3. Get the login form.
  4. Send the login details with the cookies.
  5. Follow the redirection
  6. Get the target block value from the opendocument.

I am able to proceed till step 3. I am not sure how to proceed further.

When using POSTMAN, I am unable to login with it as well.

My steps might be wrong. Looking for any help with how to proceed further will be useful including with POSTMAN or even a different login procedure.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Joe_Peters
Active Contributor
0 Kudos

It's not the JSESSIONID that you need, it's a BusinessObjects-generated session token. This can be done with the platform SDKs (Java or .NET) or via the REST API. Since you're using Python, you'll need to use REST.

See this blog post for the basics of connecting via REST, and this question about calling openDocument with a token.

pmankar
Explorer
0 Kudos

Hi Joe,

Thanks for the reply.

I tried using X-SAP-LogonToken generated by using the REST APIs and using the token in

http://<serverName>:<portNo>/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=<iDocID>&...;

I was able to log in. The problem here is, it is now presenting the entire report (in the java applet) and not the exact block that I am trying to fetch.