Blue Iris Alert HTTP POST

lando786

n3wb
Feb 23, 2019
5
0
Iowa
Hello all,

I have deployed a WebApi and would like to get BI to interact with it, however every POST call I make via the alerts screen gives me back a 400 [Bad Request], regardless of how I format the POST body.

The only way I've managed to mimic this behavior in Postman is by changing the ContentType of the body in my request. Does anyone know what the default content type BI is sending it's http request body in?

Or maybe I'm just improperly formating?

all I really need is a CameraName="something"

Ive tried [{"CameraName":"Something"}] , {"CameraName":"Something"}, ["CameraName":"Something"] and even "CameraName":"Something" with no luck.
 
In the webserver section, help file, is a list of all the commands and their formats. Is that what you need?
 
It would be more of Camera Properties-> Alerts -> Help. But the only information provided is to put the text of the post body in the box, no info is given on how that message is sent to the url.
 
Thanks, that actually confirmed my suspicion that it is indeed sending over the request with the ContentType set to text/plain. I'll either have to update my api to handle that or find some way to change it on BI's side.
 
Thanks, that actually confirmed my suspicion that it is indeed sending over the request with the ContentType set to text/plain. I'll either have to update my api to handle that or find some way to change it on BI's side.

Did you ever find a solution to this? I'm having the same issue which lead me to this post. Trying to get BI to send my payload using the content type of application/json as I'd prefer to not have to re-write my endpoints to accept plaintext payloads.
 
Talk about an old thread lol. If I recall I just updated my endpoint to accept text/plain. Not sure if this has been fixed in later versions.
 
@Dex
Did you ever find a solution to this? I'm having the same issue which lead me to this post. Trying to get BI to send my payload using the content type of application/json as I'd prefer to not have to re-write my endpoints to accept plaintext payloads.


This does has me thinking of things I'd do differently. I'll hit you up on DM to discuss.
 
I know this is a very old thread but I am currently playing with BI and Codeproject and stumbled across this issue and think I have the solution and thought it was worth posting in case someone stumbles on the same issue.

Ignore my test server address the important bit is specifying the HTTP header
1705237486701.png