Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I am trying tp pull data from a REST API using the M query as below,
let Pagination = List.Skip(List.Generate( () => [WebCall=[], Page = 1, Counter=0], // Start Value each List.Count(Record.FieldNames([WebCall]))>0 or [Counter]=0, // Condition under which the next execution will happen each [ WebCall = Json.Document(Web.Contents("http://py-soconnect.fusesport.com/api/members/for-season/250/?page="&Text.From([Page])&"")), // retrieve results per call Page = [Page]+1, Counter = [Counter]+1// internal counter ] ) ,1), #"Converted to Table" = Table.FromList(Pagination, Splitter.SplitByNothing(), null, null, ExtraValues.Error) in #"Converted to Table"
However the last row is a ERROR record and the error message is as follows,
DataSource.Error: Web.Contents failed to get contents from 'http://py-soconnect.fusesport.com/api/members/for-season/250/?page=246' (404): Not Found Details: DataSourceKind=Web DataSourcePath=http://py-soconnect.fusesport.com/api/members/for-season/250 Url=http://py-soconnect.fusesport.com/api/members/for-season/250/?page=246
Because of this I am unable to load the data into the model. Any help will be really appreciated.
Thanks in advance.
Hi @Anonymous ,
Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered to close this topic?
Regards,
Daniel He
Hi @Anonymous,
Based on the code you have posted in your issue, it could work on my side:
Could you have check the code in other computers to have a try?
Regards,
Daniel He
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
68 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |