standard user trigger job to build data cube

I want a standard user to be able to refresh a data cube (build warehouse) on demand. Several posts, including the article link below, makes it appear that you can do this through an API call but it does not appear to work using a standard user login. The second article linked below makes a reference to that the logged in user would need to have a developer role. Can anyone confirm this? This seems to defeat the purpose of using the API. If the user had the rights within Dundas, I would just have them right click on the data cube to build it. Since they don’t have those rights, I need to build an application that will let them trigger the build warehouse but it appears I can’t even do that without assigning the fixed login account with a developer license. Anyone done anything similar? Thank you.{id}/POST.html%3FTocPath%3DDundas%20BI%20REST%20API%20Reference|DataCube|_____29


give me a few I got a button click script to starts jobs. I do not remember why I have the sleep function.
I have this on a double click even on an image and it the pops up a layer that has a label that tells them it has tarted and then they click anywhere on that layer to close it. So I think the delay is so the layer works.

function sleep(milliseconds) {
  var start = new Date().getTime();
  for (var i = 0; i < 1e7; i++) {
    if ((new Date().getTime() - start) > milliseconds){
//build the data cube in warehouse using the data cube id
//Parameter 'true' if the data cube is to be built in-memory
//'false' if the data cube is built in the warehouse
var dataCubeService = this.getService("DataCubeService");
dataCubeService.buildWarehouse("CUBE ID GOES HERE",false);

dataRefreshLabel.labelText = “DataCube Name”; // the label in the layer, not needed if no label used.

1 Like

That would be much appreciated. I changed the login account to be a developer, just to test if it worked, and I get a return httpStatusCode of OK so it seems like it should work but the Jobs does not show the Build Warehouse actually running.

This works for my users and I even have this set for all my users

just verified that too, i looked up a user that i know runs them and it is set to deny for her.

That is such an easier way than what I was trying to (calling the API through a separate c# application). Thank you for that! It still doesn’t work for a normal standard or power user though. It only works for me, a developer. Hmm, I will keep looking at the settings. Please let know if you have any suggestions. Thanks again for the script, it was very helpful.

check permissions on the data cube, i think they need execute.

I tried giving them execute, Full Control, everything and it still does not work for them.

interesting this has stopped working for me. i just used my test user to log in and try running the build and it didn’t start I know this worked before. my user must not be using this any more. i am on version
what has changed this use to work for me?

I just gave that test user the Data Cube warehouse storage Privilege and still not working.

Since I know this worked before I call bug or they changed something that I glossed over in release notes and am not up to date on.

Very interesting. @jeff, I also put a ticket into support asking about this, thinking that it was working for James and I wasn’t sure why. Issue 82726

Hi James/Kelly,

It looks like this is a section of the API that should only be possible to use with a developer user. In the past, it seems it worked but it is something that by design should not have worked.

Have you tried using the ‘API User’?

When you say “API User”, do you mean using a Dundas account as the hard coded login to access the API to run it? I have done that and when I made the Dundas account a developer, it did work. Or is there some other API User that I am not aware of? This is just a fixed Dundas account that I used so it doesn’t seem right to waste one of our few developer licenses in this way. I tested this through a separate c# application but I really like the simplicity of James’ solution and staying within Dundas. Is there a better way to be doing this so that a standard (or power, if needed) user can kick off the warehouse build?

Hi Kelly,

I haven’t talked to the R&D team on this but from what i understand this oversight was purposely closed because it could be considered inappropriate for standard user to do it. Imagine having a public portal with some very large cubes - you don’t want standard users making API calls to rebuild this cubes without your control. Also, the rest of the UI doesn’t allow standard users to edit/modify data cube - why should they be able to do it from the API?

To solve your problem of not having a developer user, you can user the API user that I mentioned. Create a new account from the administrator screen and look for the option called API account.

An API account is essentially a free license that is not allowed to use the API, just API calls. Since you don’t want to have to purchase a new developer license just for this, the API account should be a good solution.

hope this helps.

Thank you, @jeff. I created the API user with a developer license and it did not appear to affect the seat license usage. I was then able to use that user in a .net application to call the API. Thank you so much for your help and to James for getting you involved in this issue!

1 Like

My pleasure. :slight_smile:

Just to correct this for anyone else who comes here looking for what I was, Jeff should have said:
“An API account is essentially a free license that is not allowed to use the --UI–, just API calls.”

This was an important distinction as I almost accidentally turned this on for MY dev login. I think I would have lost UI access if I did that!

1 Like