How to use Pentaho Community API - pentaho

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.

Related

How to handle App version while your newer vesion is in review?

I am new to version controlling and managing. I am in a situation where my current application is published and users are using it.
We have a new version, which we want to submit for review but for that we need to upload new version of backend to cloud and it wont work for older version and if we wont upload newe version then it wont work for reviewer.
How to resolve this issue ? Or Better implementation suggestions. Thank you
FrontEnd:- ReactNative
Backend:- Node and Express
Query Language for API: GraphQL
Cloud: Microsoft Azure.
Dont know how to resolve this
ok. for this. you have solution. you have to create a new api with v2 and run it. same put a static value on backend and Front-End for example
APP_VERSION = 1.
Now Create an API where it we'll get version from backend. if version number or different the show a message to user that please update the application.
for example. if we have uploaded new version to backend
APP_VERSION = 1.1
and user have app with
APP_VERIOSN 1.1
then show a message that please update to latest version

Keycloak with Angular + TypeScript for iOS/Android

I have an Angular(2) + TypeScript application using Keycloak as the authentication/authorization provider,
would like to integrate Keycloak with NativeScript to make the existing web application cater to iOS/Android users.
could see Keycloak supports iOS/Android as listed here : http://www.keycloak.org/docs/2.5/securing_apps_guide/topics/overview/supported-platforms.html?408DD571-0042-4EBB-BC37-1F2966A56651=123451
Is there any NativeScript based plugin to integrate with Keycloak (could not find anything here : http://plugins.nativescript.org/ ) ? pointers for a possible solution would be of great help
Version:
tns --version
2.5.0
Looks like the answer is no. But I start playing around, and to create a plugin, we have basically two strategies:
Extend a pure OAuth client for nativescript. There is this plugin: http://plugins.nativescript.org/plugin/nativescript-oauth
Port the keycloak.js to Nativescript.
I like the second approach because there are more features build in keycloak, so my first try was edit the original code and remove the use of window and other API's that are not present in the browser. I quickly find out that keycloak.js code is a mess (at least to me), and I'm getting a bad time undestanding how to edit its 1258 lines. Because of that, I start a complete rewrite, highly inspired in the original. I'm actualy reading the code and trying to port the project piece by piece, reorganizing for test, and abstracting the use of browser API's to port for web and nativescript.
You can check the code here: https://github.com/atende/keycloak-js-universal but is not close to ready.
The problem is, I have no time to do it :-), but will get done eventually, because I need that too.
Is important to mention that I create a abstraction for Angular 2 that works using the keycloak.js for security, and porting the keycloak.js is strategic to make the library work for Angular 2 Nativescript, which is on my motivation to do it. You can check the project here: https://github.com/atende/angular-spa
Any contributions are wellcome ;-)

Is there any API to automate extension installation in XWiki?

I use xwiki Enterprise 7.4. The official way to install extensions is to use either Import feature or Extension Manager. Both ways require user interaction. I would like to automate extension installation process, so no user interactions for extension installation. Is it possible? I've automated spaces/pages creation via REST API. Maybe it's possible to use REST API to do it, I can't find it in documentation.
Why do I need it? It's simple: I've automated all the steps of deployment/migration process for my application and I would like to automate xwiki extension installation too.
As indicated by Vincent, you can use the extension script service from inside XWiki. This script service is what the UI is using so everything the UI is doing can be done also by any script (as long as the script author has proper rights).
I just wrote a Velocity example on http://extensions.xwiki.org/xwiki/bin/view/Extension/Extension+Script+Module#HNon-interactiveandsynchronousinstall:
{{velocity}}
## Create install request for extension with id org.xwiki.contrib:extension-tweak and version 1.3 on current wiki
#set($installRequest = $services.extension.createInstallRequest('org.xwiki.contrib:extension-tweak', '1.3', "wiki:${xcontext.database}"))
## Disable interactive mode
$installRequest.setInteractive(false)
## Start install
#set($installJob = $services.extension.install($installRequest))
## Wait until install is done
$installJob.join()
{{/velocity}}
All you need is to put the Thomas' script in a page. You can use the REST API for that. See: http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#HPageresources
Then you call the URL from your application.
Ex: you put the code in XWiki/AutoInstall with a REST call and then you can call this page with the following url:
http://localhost:8080/xwiki/bin/get/XWiki/AutoInstall
I suggest to use the "get" action from the URL to avoid unnecessary informations.
The XWiki Core dev team is aware of this and it's in the roadmap but it's not done yet. For example you can see that it was planned for the 8.0 roadmap but it slipped (http://www.xwiki.org/xwiki/bin/view/Roadmaps/Archives8xCycle/).
Continue improving upgrade tools: Scriptable upgrades (priority 1), Simulation (priority 2)
It seems there's no issue created for this at the moment. Would be great if you could create a JIRA issue at http://xwiki.org in the XWiki Platform project.
Now regarding extensions, there's some Script Service that can be used to manipulate extensions, see http://extensions.xwiki.org/xwiki/bin/view/Extension/Extension+Script+Module
However this documentation is pretty terse. You could check the java code at https://github.com/xwiki/xwiki-platform/blob/95abd2951123431c1624c124b49ca7a88b41be00/xwiki-platform-core/xwiki-platform-extension/xwiki-platform-extension-script/src/main/java/org/xwiki/extension/script/ExtensionManagerScriptService.java#L84-L84
I've not personally used this script service so I can't give real examples of using this API

View API data with chrome DevTools

I am working on a site that uses the PayPal API. This new site will replace the old site at my job. As of right now, I need to check what data the old site sent to the PayPal API. Is there a way to check what data is being sent to and from a different site or API? It is data that is not typed in by the user, but data that already exists in the database that is being sent to the API.
Any help or advice would be great.
Thank you!
It "depends". On Windows platform you could use:
Fiddler or;
Microsoft Message Analyzer
to inspect traffic i/o (on the client system where either tool is installed). I'm sure other platforms will have similar tools.
Chrome Dev (or any other browser) tool will help with browser based traffic.
IMHO, depending on how "old" the existing system is, it maybe worth looking at the API again to see if any newer features are worth the effort since you're updating things...and seems to me getting paid/payments systems/ops would be something high on the priority list :)
Hth...

Is there a good way to wrap an existing Python based web application to require a login?

I'm in the process of installing an open-source Python based web application to an internal server here at work. The existing code is open - it doesn't require a login to view it - but one of the requirements is that users have to be approved before they can see anything.
Is there a good way (using Apache configuration files for example, but any method would be great) to wrap the application so that any access requires a login? I would like to avoid modifying the open-source code (a maintenance nightmare every time a new release comes out).
Any thoughts or suggestions?
Apache supports Authentication, Authorization and Access Control.
It is a detailed process, and summarising it here would not do it justice. I refer you to the link provided,