curl interactions #36
-
There is something that I do not seem to understand. I have a MicroStrategy Server running on my local machine, running Windows 10, and MicroStrategy 2021 Update 11. I connect to the REST API using a curl command and sending on json data. curl -i -X POST http://my_pc:8080/MicroStrategyLibrary/api/auth/login -H "accept: application/json" -H "Content-Type: application/json" -d "{"username":"REST_API_User","password":"rest_password","loginMode":1}" Then I get a response: So I am under the impression that I am successfully authenticated, and have been supplied a Authentication Token, and can now interact with the REST API using this token. So I send my second curl command: And I get the response: {"code":"ERR009","message":"The user's session has expired, please reauthenticate","ticketId":"5ee91f76906a48cb849fc0f1622f6fcc"} looking at the documentation The MicroStrategy error logs in Anyone have any ideas for me, please? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I figured it out watching a video of Daniel Zumbaugh, you need to add the JSESSIONID info too when using curl. |
Beta Was this translation helpful? Give feedback.
@ChristiaanEmpowerBI Be aware other cookies may be required depending on infrastructure configuration, such as load balancer. This is due to sticky sessions being required configuration for horizontally scaled MicroStrategyLibrary applications.
See documentation for reference:https://www2.microstrategy.com/producthelp/2020/RESTSDK/Content/topics/REST_API/REST_API_Workflow_Authentication.htm