question

johnart-2138 avatar image
0 Votes"
johnart-2138 asked MayankBargali-MSFT answered

Error Bad Request on consuming azure API with postman

Hi all

i’m trying to invoke Azure API with postma, but i receive this error:

400 Bad Request

can some help to understand where am i wrong ?

here my Postman request
{
"info": {
"_postman_id": "xxxxxxxx",
"name": "xxxxx_Azure",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "uploadItem_20210813",
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"user-agent": true,
"accept": true,
"accept-encoding": true,
"connection": true,
"content-length": true,
"host": true,
"content-type": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/octet-stream",
"type": "text"
},
{
"key": "Ocp-Apim-Subscription-Key",
"value": "zzzzzzzzzzzzzzzzz",
"type": "text"
}
],
"body": {
"mode": "file",
"file": {
"src": "my.csv"
}
},
"url": {
"raw": "https://api-eu.vusion.io/vcloud/v1/stores/myStoreId/items/files/my.csv",
"protocol": "https",
"host": [
"api-eu",
"vusion",
"io"
],
"path": [
"vcloud",
"v1",
"stores",
"mystoreId",
"items",
"files",
"my.csv"
]
}
},
"response": []
}
]
}

windows-apiazure-functions
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@johnart-2138 Welcome to Microsoft Q&A Forums.

Which Azure API are you trying to invoke?

0 Votes 0 ·

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered

@johnart-2138 As per the request looks like you are executing the APIM operation. 400 error generally means that the request body is not correct. I will suggest you to Debug your APIs using request tracing and verify what is the request passed to your backend API and what was the response from your backend API. I will also suggest to verify whether it is the right request body that is passed in the traces to the backend API.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.