Server error when POSTing new annotations via REST API #607
-
I'm trying to add new single-keyframe, whole-frame annotations to an existing video using the API to speed up an annotation task, but I'm getting back a "Status 500 - Server Error" message. Here's an example of how I'm formatting my request (in R): # Set the URL
url <- "https://biigle.de/api/v1/videos/123456/annotations" # made up video_id
# Define annotation parameters
body_list <- list(shape_id = 7, # whole-frame annotation
label_id = 194483, # id of desired label
frames = 109.7688, # desired frame
points = numeric()) # empty vector of points to satisfy the parameter requirement, although omitting this doesn't change the error message
# Post
res <- POST(url,
config = authenticate(login, pass), # stored elsewhere
body = body_list,
encode = "json")
# See the message
cat(content(res, as = "text", encoding = "UTF-8")) Looking at the message shows the server error.
Does this mean that there is something wrong with my request to the server, or is this an error on the server's end? Any help would be greatly appreciated - I'm fairly new to working with APIs, so please forgive me if I'm missing something obvious here! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I saw that 😉 Your request is incorrect but the validation logic of the server had a bug, too (#606).
|
Beta Was this translation helpful? Give feedback.
I saw that 😉 Your request is incorrect but the validation logic of the server had a bug, too (#606).
frames
must be an array (with a single element) even if it is a WholeFrame annotation.