span8
span4
span8
span4
Hello everybody,
I´m trying to solve problem with using REST API on FME Server. All I need is to generate new session ID for every data upload to FME server. Is there any special function to generate new session ID?
Now, if I upload new datafile, the FME Server still keeps the same session ID, e.g.:
{"serviceResponse": {
"statusInfo": {"status": "success"},
"session": "DDDB81451D5F0192DE8292DD71A0EF46",
"files": {
"path": "",
"folder": [{"name": ""}]
}
}}
I tried to use getSession function (meant there: https://knowledge.safe.com/questions/57605/javascript-rest-example-keeps-sessionid.html) but i doesnt work, because it returns still the same session ID. How to generate new one please?
Thank You so much for all tips!
Lubo
Hello @GerhardAtSafe,
unfortunately, It doesnt help me... We just tested this call via web browser, but finally, we can´t use JavaScript and we will not call this link via web browser, but we will call it from another application (customized for customer) based on another technology. Is it problem? Is there any possibility to generate new Session ID via this call from another application without using javascript?
getSession : function(repository, workspace, callback){ callback = callback || null; var url = buildURL('{{svr}}/fmedataupload/' + repository + '/' + workspace); var params = 'opt_extractarchive=false&opt_pathlevel=3&opt_f ullpath=true&token=' + getConfig('token'); ajax(url, callback, 'POST', params, 'application/x-www-form- urlencoded'); }I the video you previously shared you are sending GET requests to the data upload service which only returns the current session. A POST request will renew the session if no jsid is specified.
which version of the FME Server JS API are you using?
With your version of FME Server (Build 17725) you should use the version v1.1. Please be aware that our examples on the FME Server Playground we are using version v1.2. because they run on the newest version of FME Server.
Let me know if this helps.
© 2019 Safe Software Inc | Legal