In addition to being able to generate documentation manually based on a QUBEdocs Package or via FTPS, QUBEdocs Cloud allows users to upload a QUBEdocs Package over HTTPS by using the QUBEdocs API. This is useful for integrating an on-premise version of Planning Analytics/TM1 with QUBEdocs Cloud or integrating QUBEdocs Cloud with another third party application.
IMPORTANT Before using the API you will need to create a chore to automatically schedule the "}QUBEdocs Update" process to run at least 10 minutes before the API call is invoked. This will ensure that information sourced from the TM1 Server such as object definitions, stats, cube & dimension relationships etc. are written to disk. The chore can be set with the following properties.
Steps on how to use and test the API are given below.
1. Edit the model connection by navigating to the 'Edit Settings' menu option
2. Click the 'API' tab
3. Create a unique token for the connection by clicking the '+ Create token' button. This will add the new entry to the table below the button. From here you can see when it was created, the value for the token itself and whether or not it is active or has been expired.
5. To test the API click on the 'Download Sample Script' button. This will download a Powershell script.
6. Launch a Windows Powershell window and Execute the PowerShell script with the following parameters "./Upload.ps1 '{API Key}' {Your Name} {Path to TM1 Data Directory}"
7. If it is successful you will see the message;
8. After running the command check that you can now see the new documentation version generated / being generating in QUBEdocs Cloud.
9. If regular scheduled uploads are required a Windows Scheduled Task can be setup to send the documentation through the API daily or weekly.
Troubleshooting:
In the Prolog of the QUBEdocs Package Logfiles process, change the following line EXECUTECOMMAND(sExecuteStr,0); to EXECUTECOMMAND(sExecuteStr,1); and re run the process.
Next, go to <Your data directory>/QUBEdocsFiles and open the file title QUBEdocsExecuteStr.txt
Open Powershell and navigate to your data directory
Copy the command from QUBEdocsExecuteStr.txt excluding the "" and run it in Powershell. This should give you some idea as to what the issues are.
The most common ones are:
Your group policy is blocking execution of Powershell scripts
The directories you've selected are incorrect
The Token is incorrect or you've forgotten to put quotes around it.
If you're still running into issue, try running the following command on the PowerShell script Unblock-File Upload.ps1
Comments
0 comments
Article is closed for comments.