Vast.ai API
Network Volumes
unlist network-volume
1 min
code examples curl location 'https //console vast ai/api/v0/network volume/unlist' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{"body" {"id" 0}}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "body" { "id" 0 } }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //console vast ai/api/v0/network volume/unlist", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //console vast ai/api/v0/network volume/unlist") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "body" { "id" 0 } }) response = https request(request) puts response read body import requests import json url = "https //console vast ai/api/v0/network volume/unlist" payload = json dumps({ "body" { "id" 0 } }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successful response { "success" false, "id" 0, "msg" "" }// bad request { "error" "invalid args", "msg" "you must pass in `id` in the body of the request" }// forbidden { "error" "not authorized", "msg" "authorization error check that you have proper privileges to perform this action " }