Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello,
I need to connect in API with method POST and authorization token, but the response is 404 or 400.
I tried with M language:
let
Json = Json.FromValue({[idType= "Authorization", idValue= "KEY123"]}),
Source = Json.Document(Web.Contents("https://apiintegracao.milvus.com.br/api/chamado/listagem", [Headers=[#"Content-Type"="application/json"]]))
in
Source
And I tried with Web Data Source, and not works?
The API link I'm trying to connect:
https://developers.milvus.com.br/#api-Chamado-listagemChamados
Anyone can help me, please?
Sorry about my level English.
Use a Python script being read directly by Power BI to query the API. Refer to the API https://developers.milvus.com.br/#api-Chamado-listagemChamados documentation to modify the parameters and the filter body ('filtro_body')
import requests
import pandas as pd
import json
url = "https://apiintegracao.milvus.com.br/api/chamado/listagem"
# Add Query Param to the URL
url += "?total_registros=1000"
payload = json.dumps({
"filtro_body": {
"status": 4,
}
})
headers = {
'Content-Type': 'application/json',
'Authorization': '123token'
}
response = requests.request("POST", url, headers=headers, data=payload)
# Parse the JSON response
data = response.json()
# Check if the response was successful
if 'lista' in data:
# Convert the response data to a DataFrame
df = pd.DataFrame(data['lista'])
# Select and organize columns
columns_to_select = ["codigo", "cliente", "contato", "categoria_primaria", "categoria_secundaria", "tecnico", "total_horas", "data_criacao", "data_solucao", "servico_realizado"]
if all(col in df.columns for col in columns_to_select):
df = df[columns_to_select]
# Format date columns, if necessary
df["data_criacao"] = pd.to_datetime(df["data_criacao"])
df["data_solucao"] = pd.to_datetime(df["data_solucao"])
# Display DataFrame in tabular format
print(df.to_string(index=False))
else:
print("Some specified columns are not present in the DataFrame returned by the API.")
# Add logic here to handle the situation of missing columns, if necessary.
else:
print("Error in API response:", data)
I tried, but not works too.
Now, I'm trying this way:
let
content = "{""filtro_body"": ""123""}",
Source = Json.Document(Web.Contents("https://apiintegracao.milvus.com.br/api/chamado/listagem",
[Headers=[#"Authorization"="token",
#"apikey" = "****",
#"filtro_body" = "{}",
#"ContentType"="application/json"],
ManualStatusHandling = {404, 400},
Content=Text.ToBinary(content)]))
in
Source
And not works too, but show me another message "Parameter not informed in the request body => {filtro_body}"
I added the parameter 'filtro_body", but the message remains
Authorization also needs to be added to the Header. Please try again after making the header changes
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 4 | |
| 3 | |
| 2 |