Remove a staged artifact
curl --request DELETE \
--url https://api.boxrouter.ai/api/v1/artifacts/{artifact_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.boxrouter.ai/api/v1/artifacts/{artifact_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.boxrouter.ai/api/v1/artifacts/{artifact_id}', 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://api.boxrouter.ai/api/v1/artifacts/{artifact_id}",
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://api.boxrouter.ai/api/v1/artifacts/{artifact_id}"
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://api.boxrouter.ai/api/v1/artifacts/{artifact_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.boxrouter.ai/api/v1/artifacts/{artifact_id}")
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{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}Artifacts
Remove a Staged Artifact
Delete source storage without deleting resulting provider images. Reject with 409 while a submitted build, file transfer or credential-factory activation still needs these bytes. An activated factory uses its retained encrypted copy; deleting staging bytes does not revoke that credential version. Successful deletion is idempotent for a known owned record; unowned IDs remain 404.
Remove a staged artifact
curl --request DELETE \
--url https://api.boxrouter.ai/api/v1/artifacts/{artifact_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.boxrouter.ai/api/v1/artifacts/{artifact_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.boxrouter.ai/api/v1/artifacts/{artifact_id}', 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://api.boxrouter.ai/api/v1/artifacts/{artifact_id}",
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://api.boxrouter.ai/api/v1/artifacts/{artifact_id}"
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://api.boxrouter.ai/api/v1/artifacts/{artifact_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.boxrouter.ai/api/v1/artifacts/{artifact_id}")
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{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}