Reply To: Requête OData / pagination

  • Xavier NOEL-BRIAND

    Member
    10 mars 2023 at 13h55

    Merci pour ton retour Jérémy Laplaine 🙂

    On a créé une fonction personnalisée dans PowerQuery getOdata avec le code suivant et ça fonctionne 🎉

    letn    Source = (url as text) => letn        GetPage = (url) => letn            Source = Json.Document(Web.Contents(url, [Headers=[#"Authorization"="Bearer " & getToken()]])),n            NextList = Source[value],n            Result = try @NextList & @GetPage(Source[#"@odata.nextLink"]) otherwise NextListn        inn            Result,n            Pages = GetPage(url),n            #"Converti en table" = Table.FromList(Pages, Splitter.SplitByNothing(), null, null, ExtraValues.Error)n    inn        #"Converti en table"ninn    Source

    CommentID=bGNGNm6U4U8zwNw, PostID=IT9iFywp9PBDbYs