Delete video

Delete videos

Use the following API call to delete a video from your Brid library. You can as well delete multiple videos at once by providing an array of ids.

Parameter name

Description

Required

ids (integer)

Comma separated values of video ids

yes

partner_id (integer)

Websites id in Brid.tv

yes

Example

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://<<brid_api_url>>/apiv3/videos/delete.json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => array('data[Video][ids]' => 'VIDEO_ID','data[Video][partner_id]' => 'PARTNER_ID'),
  CURLOPT_HTTPHEADER => array(
    "User-Agent: Api | BridVideo"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
  .addFormDataPart("data[Video][ids]", "VIDEO_ID")
  .addFormDataPart("data[Video][partner_id]", "PARTNER_ID")
  .build();
Request request = new Request.Builder()
  .url("https://<<brid_api_url>>//apiv2/videos/delete.json")
  .method("POST", body)
  .addHeader("User-Agent", "Api | BridVideo")
  .build();
Response response = client.newCall(request).execute();
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': '<<brid_api_url>>',
  'path': '//apiv2/videos/delete.json',
  'headers': {
    'User-Agent': 'Api | BridVideo'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data[Video][ids]\"\r\n\r\nVIDEO_ID\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data[Video][partner_id]\"\r\n\r\nPARTNER_ID\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--";

req.setHeader('content-type', 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');

req.write(postData);

req.end();
import http.client
import mimetypes
conn = http.client.HTTPSConnection("<<brid_api_url>>")
dataList = []
boundary = 'wL36Yn8afVp8Ag7AmP8qZ0SA4n1v9T'
dataList.append('--' + boundary)
dataList.append('Content-Disposition: form-data; name=data[Video][ids];')

dataList.append('Content-Type: {}'.format('multipart/form-data'))
dataList.append('')

dataList.append("VIDEO_ID")
dataList.append('--' + boundary)
dataList.append('Content-Disposition: form-data; name=data[Video][partner_id];')

dataList.append('Content-Type: {}'.format('multipart/form-data'))
dataList.append('')

dataList.append("PARTNER_ID")
dataList.append('--'+boundary+'--')
dataList.append('')
body = '\r\n'.join(dataList)
payload = body
headers = {
  'User-Agent': 'Api | BridVideo',
  'Content-type': 'multipart/form-data; boundary={}'.format(boundary)
}
conn.request("POST", "//apiv2/videos/delete.json", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "net/http"

url = URI("https://<<brid_api_url>>//apiv2/videos/delete.json")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["User-Agent"] = "Api | BridVideo"
form_data = [['data[Video][ids]', 'VIDEO_ID'],['data[Video][partner_id]', 'PARTNER_ID']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body

Did this page help you?