Reading app properties from the app
How can we read the app properties defined in the app profile in OTAG within the app?
Comments
-
I believe you can achieve that with the AppWorks Settings API.
0 -
A couple of things the swagger doc doesn't make explicit:
- The key is
<your app name>.<your setting name>
. For example, if your app isdemo_1.0.zip
, and you havellama.default=http://llama.com
in app.properties, then you would GETgateway/v2/settings/demo.llama
. You need to provide authentication to GET a setting. To do this:
for mobile apps, add an http header called
otagtoken
with the value of the javascript variableotag.auth.otagtoken
for Gateway web apps, include
/webaccess/js/otag.js
, and useotag.ajax()
instead ofjquery.ajax()
; this wrapper sets the header for you
0 - The key is
-
Thank you John this last part of getting the token is what I was missing.
0 -
While I was able to work directly with jquery.ajax, it looks like I cannot access otag.ajax. All I get is:
Object # has no method 'ajax'
Is it possible that I need to reference other js files other than jquery and otag.js?
0 -
Otag.js is currently just for web apps; mobile html5 apps should use $.ajax for now.
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 104 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax