API rest Pentaho - rest

I need to get , with API rest call in pentaho, a list of dashboards in the public(or another) folder and if it's possible the list of datasources used in these dashboards. it's possible?

Yes, with /repo/files/{pathId}/children you get a list of child files from the selected repository path of the repository.
In your case /repo/files/public/children gives a xml that you further interpret to know if the <file> is a directory, a report, a dashboard or something else, based on its extension. You can also get the acl to know if a given user/role can see the dashboard or not.
Full documentation is there, and according to my previous experience, you will need some trials and errors before to find the correct syntax and filters.
So don't give up "YES it is possible!".

Related

Changing a text in multiple AEM pages at multiple locations

I have a website hosted on AEM. I want to change a text that is present in almost all pages (say I want to change my product name which is present in all pages) . How can i do it. It can either be a Groovy/Java code or an ondeploy script or anything else. Because doing it manually on all pages at multiple locations is not feasible. Will AEM Bulk Editor solve the purpose?
Its like Find and replace functionality in office
Yes, you will need to have a set of queries to find most of the references and then make a POST to these pages with the new value.
Example with: curl -u $USER:$PASSWORD -F"PROPERTY=new value" "http://$HOST/content/mysite/en/page/jcr:content"
Of course, you can do it with Java, Groovy (look for Groovy Console for AEM, which is very convenient), or even bash for simpler cases.
You can write a query using the query builder api to get all the nodes where your particular property is present.
Then once you get the path to that property you can update that using the node api.

Where to update new PAS token from MS DevOps in my Angular 2+ source code?

I have a Personal Access Token about to expire in DevOps/VSTS, but I can't see it in DevOps to do a ctrl-f and find it in my source code.
I have an Angular 2+ frontend with a .net core api backend.
Which file should I be looking at? Does it need to go in the backend? Or Frontend? Or both?
config.json? project.json? Which property is it (if it is a config file like that)?
Or is it somewhere else I need to update this? Not in source code, but something with the build agent? How would I update that?!
Which file should I be looking at? Does it need to go in the backend?
Since we could not clearly know how is your script look like, I assume you may not remember clearly about this because of huge script files. For this, Azure Devops has a feature Search can search what you want across all your code.
For any repos which with a api called, we suggest you search the code files first with Search feature. And also, you may pass the token value with task variable. So, you also need to check your pipeline variable.

accessing XHR within google sheets

I've been using import functions a lot in my sports modeling, but I've never been able to figure out how to get past the issue of pulling information that is dynamically imported from another source.
For example, i'm trying to use importxml to pull the money line values in this link here: https://www.sportsbookreview.com/betting-odds/nfl-football/money-line/
I can get the information in the left columns up until "PINNACLE", and after research i now understand I can't get the rest of the information because it's not static on the page and I need to go to the source... how do I find the source of this information so I can pull it from there?
I tried inspecting the page, clicking on "network", clicking on "XHR", refreshing the page and previewing the results, but nothing seemed to match.
Am I looking in the wrong place?
The page uses websockets to download the data, so I don't think you could simulate it in Google spreadsheets using formulas (maybe it could be possible in a script). However in this particular case there is a 'classic view' variant of the page which includes all the data in its source:
https://classic.sportsbookreview.com/betting-odds/nfl-football/money-line/

Does a what-links-here report for Gollum exist?

Is there any existing way to generate a what-links-here report for a gollum wiki? In other words, a list of the pages within the same wiki that link to the current page: a list of the local inbound links.
I wasn't able to spot any feature like this, nor find anything suitable in the API, but I may have missed it. Is there a third party add-on for it?
I do understand the reason it probably doesn't exist in the core: as these are plain text files, there isn't any table of links maintained anywhere. For the same reason, when a page is renamed it breaks all the inbound links to that page from other pages.
A function for this could use the API to read the generated source of each page (so that only html with normalized names needs to be parsed), producing a list of the local links from each page and the page they are on. Cache the results at page level until the next commit of that page.
This could be used to enhance the existing page rename feature as well. Has anybody already done this?

Dynamically generated GET request to an external database

I'm asking for help to my problem. I am new to JSF and I have a simple JSF online store demo page. I don't even use navigation rules since I only include the page with search results beneath the searching tags fields. The problem is a have sth like 15 fields (input texts and menus) to perform a detailed search. After selecting the fields and clicking on the search button I have to generate a long GET request for the database (which is located on a different server than my page and uses REST), receive the response (xml format), extract the search results and publish them on the page. The search patter is sth like this:
http://serveradress/search/ [x1][x2][x3]....[xn]
Where x1-xn are the values for the search engine and have to be read from the page's fields, so it has to be generated dynamically. The get request can be very long since there are 15 fields and one can have some additional options. The data base is on a different server and responds with an xml script with search results.
I found some solutions on the internet on how to perform a GET request using params but don't really know how can it fit to my problem since I have to receive the results from an external data base and manage them rather inside the java bean for publishing (i do not want to change the url adres of my page).
I am using JSF 1.2, with Eclipse IDE and JBoss on Ubuntu. The search request has to be GET since the data base uses that REST interface.
I am asking for your help in this matter if someone is able to find a solution to this problem or provide me with some link. I would strongly appreciate an example code with the solution.
Use JBOSS resteasy RESTful API's