Delete asset
August 8, 2024
Table of contents
Runway Assets.
https://api.useapi.net/v1/runwayml/assets/
assetId
Request Headers
Authorization: Bearer {API token}
API token
is required, see Setup useapi.net for details.
Path parameter
assetId
is required. Specify assetId you want to delete.
Responses
-
{ "success": true }
-
{ "error": "<Error message>", "code": 400 }
-
{ "error": "Unauthorized", "code": 401 }
-
{ "error": "Not found." }
Model
{ // TypeScript, all fields are optional
success: boolean,
error: string,
code: number
}
Examples
-
curl -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -X DELETE "https://api.useapi.net/v1/runwayml/assets/assetId"
-
const assetId = "assetId to delete"; const apiUrl = `https://api.useapi.net/v1/runwayml/assets/${assetId}`; const token = "API token"; const data = { method: 'DELETE', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' } }; const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result});
-
import requests assetId = "assetId to delete" apiUrl = f"https://api.useapi.net/v1/runwayml/assets/{assetId}" token = "API token" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response, response.json())