08-28-2024 07:08 PM - last edited on 08-29-2024 07:32 AM by JackLacava
I'm trying to run cubeviews by way of the REST api on Version: 8.2.2.16127
We use PAT tokens for a native onestream user.
Suddenly I started receiving meaningless errors about a day ago like so:
"An error occurred returning data for 'Cube View RPT_SVC_PbopHierarchyBase', Please check the Error Log for more details.
Unable to create database connection. There is no open application"
Does anyone know what this means? Is it a bug? Any help would be appreciated.
08-29-2024 07:31 AM
If you upgraded from an older release, you might have not noticed that the REST api has changed. Now there is an OpenApplication call that you have to make, in order to get a SI object that you can then pass as context to subsequent calls.
If you're already doing that, you will have to post your code here, which you might not want to do - in which case, you should probably contact Onestream Support.
08-29-2024 09:27 AM
Hi @JackLacava
I truly appreciate your time, and knowledge.
Do you happen to have a link/reference? I certainly was not aware of this requirement, and in the first round of testing our code was NOT impacted by this change. (The only impact of the upgrade was the fact that we were unexpectedly required to move our authentication from OIDC to PAT tokens. )
To make matters more interesting, we already deployed the client-side code all the way to *production*, and it seems to be working as-of now (*without* calling "OpenApplication"). It seems like a concern that our production environment is a ticking bomb that is potentially going to stop working any second.
I want to point out that in every REST api call we make, there is a json body that specifies the application name and the base onestream url. Shouldn't that sufficiently indicate that the application would be auto-opened? What would be the purpose of "opening" an application as an independent step, if we have no need for the services provided in an SI object.
I should know this by now, but is V8 still a work-in-progress? Are we considered early adopters? If nothing else, I found that there wasn't any way to get a "breaking changes" document for the V7 -to- V8 upgrade. I find myself pushing forward by trial-and-error, which is an imperfect experience for software development (... especially when under time constraints, to get things working before the 2025 budgeting season).
08-29-2024 09:57 AM - edited 08-29-2024 09:58 AM
It's in REST Implementation Guide: https://documentation.onestream.com/1375907/Content/REST%20API/Application%20API.html
Generally speaking, changes are documented in the release notes: https://documentation.onestream.com/1375907/Content/RN.html
We produced a number of documents on v8 upgrades (including this note in docs and this group for early adopters), but maybe not specifically for the REST Api - since most breaking changes were about .NET.
V8 at this point is definitely not a work in progress, but we're going through some significant changes at very high speed and the documentation will lag sometimes.
09-03-2024 08:49 AM
Based on further discussions with the folks administering the onestream environment, this was something they did wrong.
Unfortunately, I have no clue what they did wrong since they didn't tell me. I'm guessing it was something simple, like they forgot to actually grant the user access to this particular application. Either way, I don't think it was a "normal" authentication failure, or the error from the REST api would have been an HTTP status (401 or whatever).
The error message from the product leaves a lot to be desired. Assuming the administrator of onestream can misconfigure a user in a simple way, we should then get a simple error message back to tell us about it. The current one ("unable to create database connection") is way too technical; it probably assumes we have access to the underlying source code for the sake of further investigation.