cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
scastrontu Frequent Visitor
Frequent Visitor

Can't connect to a website

Hi,

 

I've been using Power BI for a while, but I have encountered a problem recently when trying to connect to the GtR website. https://gtr.ukri.org/

 

This is a portal with all projects funded by UK Research Councils. At the bottom it says we can use two types of REST APIs. I don't how to work with the 2 APIs they indicate at the bottom of their website: I've use the website address and the links provided in the APIs pdfs (https://gtr.ukri.org/resources/api.html) and paste them in "Get Data > website". But, the info I get is weird and is not comparable to all the information provided in the website. So, I'm doing something wrong here...

 

Any help?

 

Thanks.

 
5 REPLIES 5
Super User
Super User

Re: Can't connect to a website

@scastrontu you have to call each api based on your need, for example, for funds use this one, get data->web and use following url

 

 http://gtr.rcuk.ac.uk/gtr/api/funds 



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut! Connect with me on Linkedin






scastrontu Frequent Visitor
Frequent Visitor

Re: Can't connect to a website

@parry2k Thanks for your support.

I did try but I didn't get the expected data... See bellow

 

1. Connected to web

Connect to web.png

 

2. This is what I get

Connected.png

3. I tried to transform this file by clicking "Open as". The only "reasonable" output was using XLM (I guess because the API pdf mentions this is stored in XML.

4. This is the results in XML

xml.png

5. Even if I expand each column (as per the indicated icon), the resulted "new columns" make no sense...

 

I tried the same steps for each provided link for "version 7" on this doc https://gtr.ukri.org/resources/GtR-2-API-v1.7.4.pdf

 

However, If I use the links provided in page 5, for http://gtr.ukri.org/gtr/api/funds I get the following If I expand all columns 

funds.png

There are a lot of columns which make no sense, but some of them do: start, end, value. But, the table only has 40 rows... and should have thousands.... 

 

Could be something wrong with the web? From the web I can download all data (which is right) on a CSV file, wich suggests that the "web" is fine. However, by connecting to APIs I can get more info than downloading the data on CSV.

 

Any suggestion?

 

Thanks for your help.

 

Sergio.

 

 

 

Super User
Super User

Re: Can't connect to a website

@scastrontu I guess each call of API return limited number of rows, you have to look into pagination and get the next page.




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut! Connect with me on Linkedin






Highlighted
scastrontu Frequent Visitor
Frequent Visitor

Re: Can't connect to a website

@parry2k Sorry, I don't understand what you mean.

I've looked into all the options that the ribbon provides, and haven't seen any button for that. The only think I could do is to expand all columns.

 

Thanks.

Super User
Super User

Re: Can't connect to a website

@scastrontu here is the post about pagination.




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut! Connect with me on Linkedin