Templates
Delete template version
Delete one published version from your registry.
DELETE
/
templates
/
{namespace}
/
{name}
/
{version}
Delete template version
curl --request DELETE \
--url https://www.orgo.ai/api/templates/{namespace}/{name}/{version} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/templates/{namespace}/{name}/{version}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.orgo.ai/api/templates/{namespace}/{name}/{version}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.orgo.ai/api/templates/{namespace}/{name}/{version}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.orgo.ai/api/templates/{namespace}/{name}/{version}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://www.orgo.ai/api/templates/{namespace}/{name}/{version}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/templates/{namespace}/{name}/{version}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"deleted": true
}Deletes a single published version you own. To replace a version in place instead of deleting it, re-publish with
?force=true.
Deleting a version that computers were launched from does not affect those running computers. They already restored from the golden snapshot. The delete only removes the version from your registry, so it can no longer be launched or built. It is scoped to your own templates, so a curated (
system/…) ref returns 404 rather than removing anything.Path parameters
string
required
Template namespace.
string
required
Template name.
string
required
Version (semver) to delete.
Response
boolean
true when the version was removed.Example
curl -X DELETE https://www.orgo.ai/api/templates/default/claude-code/1.0.0 \
-H "Authorization: Bearer $ORGO_API_KEY"
import os, requests
r = requests.delete(
"https://www.orgo.ai/api/templates/default/claude-code/1.0.0",
headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}"},
)
print(r.json()) # {"deleted": true}
const r = await fetch(
"https://www.orgo.ai/api/templates/default/claude-code/1.0.0",
{
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.ORGO_API_KEY}` },
},
);
console.log(await r.json());
Response
{ "deleted": true }
Errors
| Status | Body | Meaning |
|---|---|---|
401 | { "error": "Invalid API key" } | The Bearer token starts with sk_ but is not a known Orgo key. |
401 | { "error": "Authentication required" } | No Authorization header, or a Bearer token that is not an sk_ key. |
404 | { "error": string } | No such template version in your namespaces. |
500 | { "error": "internal error" } | Unexpected server error. |
503 | { "error": string } | No fleet host is available to serve the template registry. Retry. |
⌘I
Delete template version
curl --request DELETE \
--url https://www.orgo.ai/api/templates/{namespace}/{name}/{version} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/templates/{namespace}/{name}/{version}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.orgo.ai/api/templates/{namespace}/{name}/{version}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.orgo.ai/api/templates/{namespace}/{name}/{version}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.orgo.ai/api/templates/{namespace}/{name}/{version}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://www.orgo.ai/api/templates/{namespace}/{name}/{version}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/templates/{namespace}/{name}/{version}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"deleted": true
}