Delete task

Table of contents

  1. Request Headers
  2. Path parameter
  3. Responses
  4. Model
  5. Examples
  6. Try It

https://api.useapi.net/v1/runwayml/tasks/taskId

Request Headers
Authorization: Bearer {API token}
Path parameter
  • taskId is required. Specify taskId you want to delete.
Responses
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/tasks/taskId" 
    
  • const taskId = "taskId to delete"; 
    const apiUrl = `https://api.useapi.net/v1/runwayml/tasks/${taskId}`; 
    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
    taskId = "taskId to delete" 
    apiUrl = f"https://api.useapi.net/v1/runwayml/tasks/{taskId}" 
    token = "API token"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.delete(apiUrl, headers=headers)
    print(response, response.json())
    
Try It