BaitRadar API
The intelligence server has two main endpoint routes to pass and retrieve data.
GET : /status
- Used to get the status of the intelligence server i.e. queue details and number of online models
The following json file is returned if successful
{ "active":0, "current":[], "max_threads":8, "queue":[], "remaining":8 }
POST : /predict
- Used to pass in the video id to be predicted to the server
The following format to pass in the video id is accepted by the server. The header
Content-Type
should be also set toapplication/json
.{ "video_id":"E9lmPF48kmA" }
Then server will then return the following json response, if the video id is added to the database sucessfully
{ "reason": "", "success": true }
If an invalid url is passed in, the the server will return the following json response
{ "reason": "Invalid URL", "success": false }