Solved

Relatório pelo Power Query

  • 12 July 2023
  • 1 reply
  • 90 views

Userlevel 4

Estou tentando importar um relatório pelo Power Query, mas não consigo identificar o erro.

 

A requisição é a seguinte:

 

let
    Cabecalho = [
        #"Method" = "POST",
        #"Accept" = "application/json",
        #"Content-Type" = "application/json",
        #"Authorization" = "Bearer Token
    ],
    Corpo = Text.ToBinary(
        "{""mutation"": ""{ exportPipeReport (input: { pipeId: #########, pipeReportId: ********* }) { pipeReportExport { id } } }""}"
    ), 
    Requisicao = Web.Contents(
        URL,
        [
            Headers = Cabecalho, 
            Content = Corpo
        ]
    ),
    Resposta = Json.Document(Requisicao)
in
    Resposta

 

Estou recebendo a seguinte mensagem como resposta:

 

DataSource.Error: Web.Contents failed to get contents from 'https://api.pipefy.com/graphql' (500): Internal Server Error
Details:
    DataSourceKind=Web
    DataSourcePath=https://api.pipefy.com/graphql
    Url=https://api.pipefy.com/graphql

icon

Best answer by Ingrid Hille 17 July 2023, 23:33

View original

1 reply

Userlevel 3

Olá Breno, tudo bem? 
Boa tarde! 

Neste link, disponibilizamos exemplos em várias linguagens e você poderá checar a requisição ideal para Javascript. 
De toda forma, indicados utilizar o método fetch. 

Se restar mais alguma dúvida, pode nos contatar via chat, que veremos isso mais de perto. 😜

 

Reply