Blue Iris Alert HTTP POST

lando786

n3wb
Joined
Feb 23, 2019
Messages
5
Reaction score
0
Location
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.
 

opus too

Getting the hang of it
Joined
Nov 25, 2018
Messages
44
Reaction score
34
Location
usa
In the webserver section, help file, is a list of all the commands and their formats. Is that what you need?
 

lando786

n3wb
Joined
Feb 23, 2019
Messages
5
Reaction score
0
Location
Iowa
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.
 

lando786

n3wb
Joined
Feb 23, 2019
Messages
5
Reaction score
0
Location
Iowa
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.
 

dexter0380

n3wb
Joined
Nov 29, 2020
Messages
9
Reaction score
4
Location
Twin Cities, Minnesota
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.
 

lando786

n3wb
Joined
Feb 23, 2019
Messages
5
Reaction score
0
Location
Iowa
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.
 

lando786

n3wb
Joined
Feb 23, 2019
Messages
5
Reaction score
0
Location
Iowa
@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.
 

gashd18892

n3wb
Joined
Jan 13, 2024
Messages
1
Reaction score
0
Location
United Kingdom
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
 
Top