Delete a Project
Delete a single project
Please use this endpoint carefully. Please note that all videos inside a project will be deleted permanently when a project is deleted.
This endpoint will delete a single project and all of its videos.
DELETE
https://api.dyntube.com/v1/projects/{project-id}
Path Parameters
Name
Type
Description
id
String
Project id
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Not Found",
"status": 404,
"traceId": "00-fc3d66e5001efa41d7ce56-c691caa6cf06b649-00"
}
Code Samples
C#
// This code sends an HTTP DELETE request to delete a project from DynTube.
// Please use this endpoint carefully. Please note that all videos inside a project
// will be deleted permanently when a project is deleted.
using System;
using System.Net.Http;
class Program
{
static async System.Threading.Tasks.Task Main(string[] args)
{
string projectId = "your_project_id";
string url = $"https://api.dyntube.com/v1/projects/{projectId}";
using (var httpClient = new HttpClient())
{
var response = await httpClient.DeleteAsync(url);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("Project deleted successfully.");
}
else
{
Console.WriteLine($"Failed to delete project. Status code: {response.StatusCode}");
}
}
}
}
Node.js
const axios = require('axios');
// This code sends an HTTP DELETE request to delete a project from DynTube.
// Please use this endpoint carefully. Please note that all videos inside a project
// will be deleted permanently when a project is deleted.
async function deleteProject(projectId) {
const url = `https://api.dyntube.com/v1/projects/${projectId}`;
try {
const response = await axios.delete(url);
if (response.status === 200) {
console.log('Project deleted successfully.');
} else {
console.log(`Failed to delete project. Status code: ${response.status}`);
}
} catch (error) {
console.error(`Error deleting project: ${error.message}`);
}
}
deleteProject('your_project_id');
Python
import requests
# This code sends an HTTP DELETE request to delete a project from DynTube.
# Please use this endpoint carefully. Please note that all videos inside a project
# will be deleted permanently when a project is deleted.
project_id = "your_project_id"
url = f"https://api.dyntube.com/v1/projects/{project_id}"
response = requests.delete(url)
if response.status_code == 200:
print("Project deleted successfully.")
else:
print(f"Failed to delete project. Status code: {response.status_code}")
PHP
<?php
// This code sends an HTTP DELETE request to delete a project from DynTube.
// Please use this endpoint carefully. Please note that all videos inside a project
// will be deleted permanently when a project is deleted.
$projectId = 'your_project_id';
$url = "https://api.dyntube.com/v1/projects/{$projectId}";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($http_code == 200) {
echo "Project deleted successfully.";
} else {
echo "Failed to delete project. Status code: {$http_code}";
}
curl_close($ch);
?>
Last updated