Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Pull out data from a POST API

Hey there

 

I'm a totally newbie when it comes to POST API. I've never had to use it untill now, so I've looked into many places in the web (here included) and I was not able to find a tutorial that helped me out to pull out the data I need, so here I am hehe.

 

This link contains the API documentation.

 

From the site I need to extract the data from a report called Analitico Avaliacoes (on page 4 of the above link), and all the information I've so far on Postman is as follows:

 

https://api.2clix.com.br/Relatorio/AnaliticoAvaliacoes

{
"DtInicio": "2022-10-01",
"DtFim": "2022-10-10"
}

 

The curl script is this one (I've changed the Authorization token):

curl --location --request POST 'https://api.2clix.com.br/Relatorio/AnaliticoAvaliacoes' \
--header 'Authorization: 87C9DE-8784-4788-8799-A711F40751E0' \
--header 'Content-Type: application/json' \
--data-raw '{
"DtInicio": "2022-10-01",
"DtFim": "2022-10-10"
}'

 

Here's a list of all available formats, in case you need any further information or another format:

 

When I send the request, this is what the code bears:

{
    "result": [
        {
            "CODIGO": 123123,
            "CLIENTE": "CompanyName",
            "campanha": "Live Chat",
            "AVALIADO": "Jubileu da Cunha",
            "EQUIPE": "Ademirson Bueno",
            "AVALIADO EM": "2022-10-04T00:31:14.973",
            "TIPO DE AVALIACAO": "Padrão",
            "AVALIADOR": "Qualidade",
            "AVALIADO POR": "Túlio Maravilha",
            "processo": "Padrão",
            "COD GRAVACAO1": "1234",
            "TEMPO MONITORIA": "00:02:24",
            "nota": 100.00,
            "conceito": "Excelente",
            "DT FDBK": null,
            "Resultado FDBK": null,
            "RESPONSAVEL FDBK": null,
            "OBS LIDER": null,
            "OBS AVALIADO": null,
            "TABULAÇÃO_1": "",
            "Nota sem NCG": 100.00,
            "VISUAL. ATENDENTE": 1,
            "pesquisa_atendente": "Concordo",
            "ciclo_1": null,
            "Login AVALIADO": "[email protected]",
            "DATA_ADMISSAO": null,
            "DATA_INICIO_PRODUTO": null,
            "Cod Discador": "0",
            "Status Feedback": "Feedback Não Aplicado - dentro prazo",
            "TEMPO FEEDBACK": null,
            "Planilha": "LIVE CHAT 1.0",
            "cpf_cliente1": null,
            "Cod Gravação": "1234",
            "Codigo Integração": 0.0,
            "Data contato": "2022-10-03T15:05:00",
            "periodo": "Outubro 2022",
            "pontos_positivos": "Lorem ipsum.",
            "pontos_melhorar": "",
            "QTDE ARQUIVOS": 1,
            "matricula": "",
            "OBSERVACAO": "",
            "EmailAvaliado": "[email protected]",
            "TICKET": "[ZenDesk] 1234",
            "ACIMA_MEDIA": "SIM"
        }
      ]
}

 

From what I've seen on the web, I'll have to create a query in the advanced editor on Power Query, but I have no idea how I could do that. I'm very grateful for your help.

 

Thanks in advance.