Getting the TM1 Session ID from REST API

Hi there,

Since we know Canvas is built on top of TM1 REST API, and we have a TM1 Session ID produced whenever an user logs into TM1, how do we get the Session ID within Canvas?

Thanks

Tat

Hi Tat,

You don’t have access the TM1 Session Id, it is stored in the Canvas server and isn’t passed to the browser.

Hi Tim,

So there is no way we can get the TM1 Session ID within Canvas? Actually what I am looking for is related to the File Upload, we would like to upload the files to a random location so that if multiple people uploading files with exact same name, it won’t conflict with each other.

Regards

Tat

Hi Tat,

What do you need the TM1 Session Id for?

Each file that is uploaded using Canvas has a unique name.

Oh no, I have over-complicated the issue, thanks, will have a try with the upload.

I was thinking to create a TM1 Session ID to somehow store the files differently, and haven’t got to the code really doing the upload, and that’s why I was stuck on the Session ID part.

Hi Tat,

In that case you can use parameters in the path to save the document to a specific location. The path will be created for you.

<tm1-ui-upload tm1-instance="dev" tm1-path="{{page.finYear}}/{{page.month}}/{{user.Name}}" tm1-after-upload="getUpload(file)"></tm1-ui-upload>