I want to automate the disable access feature of my worklight application ( version :- 6.1.0.2 ) , I have created the below links referring info center links, Can any one please let me know, how can i get the value of gadgetAppID in the below mentioned urls. Also i have added the snap shot of the mysql DB.
Disable App post url below.
http://localhost:10080/AppName/console/api/applications/setAccessRule?gadgetAppId=""&action="disabled"&message="please try later”
Enable App post url below
http://localhost:10080/AppName/console/api/applications/setAccessRule?gadgetAppId=""&action="enabled"&message="please try later”
Thanks
djrekcer.
It is a bit complex in 6.1, see - http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.1.0/com.ibm.worklight.apiref.doc/admin/r_http_interface_of_the_prod_server.html (search for setAccessRule)
Starting with 6.2 there's a RESTful server API for that, see http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.apiref.doc/apiref/r_restapi_app_version_access_rule_put.html%23App-Version-Access-Rule--PUT-?lang=en
Related
I have a pentaho community server 8.1 already running and i would like to know if this version has a API avaliable? Im using the following code to and getting a 200 but there is no basic so i can authenticate correctly.
import requests
data = {"j_username": "admin","j_password":"password"}
r = requests.post('http://(serverip):8080/pentaho/j_spring_security_check', data = data)
Is the authentication for this api configurable?
The whole idea is that i can use the scheduler since the spoon for the community version doest has access to it BUT i tried using the enterprice client and i was able to schedule so the module is there you just cant reach it.
Thanks!
Yes, and the full API is documented here:
https://help.pentaho.com/Documentation/8.1/Developer_Center/REST_API
Note: If you want to enable username/password authentication on the URL you have to edit security.properties and reboot . (an older insecure approach, but for the purposes of development possibly simpler to get you going)
You're absolutely right - the CORE platform does have the functionality, just not the UI so you're more than welcome to use the API to use the scheduler engine.
We have already delivered the 1.0 version of our Worklight application. By mistake we have disabled the Direct update feature by updating the attribute "connectOnStartup = false"
We dont want to redeploy the application to markets (AppStore/GooglePlay) again, but wanted to make our users to utilize the direct update feature. We do have the access to WL server.
Our issue is little different from the one which is already discussed here "IBM Worklight - How to disable Direct Update?"
How can we provide the direct update feature to our end users without redeploying the application to AppStore/Googleplay. And just by changing the Webresources of the application.
We are using the adapters in our application but no where we are explicitly calling the "WL.Client.connect".
The Direct Update feature is always enabled by default.
You need to edit your question and explain what it is you've done in your Worklight project.
The feature will not work if:
You have set connectOnStartup:false
You are not using WL.Client.connect
You are not invoking adapters
You disabled it via the checkbox in Worklight Console
Otherwise, the feature will work, and a check for Direct Update will be performed:
On application startup
On return to foreground
The application will need Re-deployment on the App stores.
So the solution to your problem is
Rebuild the Application with connectOnStartup:true.
Redeploy the Application on App Stores
Once the users download the updated application, future updates will go to the users directly.
While rebuilding, make sure that you change the Version of your application within ApplicationDescriptor.
I'm developing a Worklight Hybrid apps targeting iOS and Android, on top of Worklight security feature we have another Web Server doing the Authentication and ACL.
Basically the Direct update feature should be available to any user without the needs to Login, therefore I've added a few White List into the ACL to make sure those user didn't get prompted for Login just for the update.
So far I've whitelisted below URL, it works in my development Machine.
apps/services/api/MYAPP/android/setup
apps/services/api/MYAPP/android/update
apps/services/api/MYAPP/iphone/setup
apps/services/api/MYAPP/iphone/update
But surprisingly it failed in Production server as the URL to perform direct update was actually as below:
apps/services/api/MYAPP/iphone/0/update?action=base64....
Why the /0/ was in place and what are the possible value?
Thank in advance.
It is based on your Worklight studio version.
For Worklight Studio version < 6.2, the direct update URL is PROTOCOL://<DOMAIN>:<PORT>/<CONTEXT_PATH>/apps/services/api/<APP_NAME>/<ENVIRONMENT>/updates?action=getzip&skin=<SKIN_NAME>&x-wl-app-version=<VERSION>
For Worklight Studio version >= 6.2, the direct update URL is PROTOCOL://<DOMAIN>:<PORT>/<CONTEXT_PATH>/directUpdate/<APP_NAME>/<ENVIRONMENT>/<VERSION>?skin=<skinName>&action= getzip
I need to customize a screen where the user can inform the worklight server ip in client-side.
I can change the url connection dynamically?
I know that pressing the menu button in android, there is the option of informing the url, but i want custom screen.
Technically speaking it is possible to change the Worklight Server URL that the application connects to, but things can and likely will go wrong and it is absolutely not supported by IBM Worklight.
As for creating some UI for it, that's on you.
See this answer by Anton: Re-route/Divert some WL.Client Adapter Invocation traffic to WL Server through different URL (for PCI payment and security requirements)?
Also see the following questions:
IBM Worklight - How to use Custom Server URL?
IBM Worklight - How to customize an app after creating its .api/.apk?
Worklight Apps pointing to different Worklight Servers
For Worklight v6.1, you can set below properties dynamically:
WL.StaticAppProps.APP_SERVICES_URL = your URL + WL.StaticAppProps.POSTFIX_APP_SERVICES_URL;
WL.StaticAppProps.WORKLIGHT_ROOT_URL = your URL + WL.StaticAppProps.POSTFIX_WORKLIGHT_ROOT_URL;
WL.StaticAppProps.WORKLIGHT_BASE_URL = your URL;
if you dig into the worklight.js file there is a function "setWLUrl(url)" that can be use to chnange the serevr URL.
call it like this and its done
setWLUrl("http://"+yourServerIP+":PORT");
its kind a hack but i think it should not have anny issue since its a function within there api.
Good Luck
I was using IBM worklight 5.6 earlier but just updated latest 6.0. Right now thinkin why I updated, earlier was good. Really lots of weird things happened in the worklight project.
App descriptor is changed, I wonder where i'm going to change the server IP ? And I also got to know that 6.0 is having some new Geo location toolkit. Where is that unable get it or did not find a way to get it. No proper doc available to me, I have done a lot google on it. If anyone is having any info regarding this ?
Build for remote server; right click the app, run as > build for remote server to change the connection hostname:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/devref/t_transporting_the_app.html?resultof=%22%72%65%6d%6f%74%65%22%20%22%72%65%6d%6f%74%22%20%22%73%65%72%76%65%72%22%20
Geolocation (location services):
http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/devref/c_overview_location_services.html?resultof=%22%67%65%6f%6c%6f%63%61%74%69%6f%6e%22%20%22%67%65%6f%6c%6f%63%22%20
The rest of the docs:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp