curl --request PATCH \
--url https://compute.{region}.basaltic.sh/v1/images/{image_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Ubuntu 24.04 LTS (Noble Numbat)",
"current": true,
"eol_date": "2026-08-31",
"tags": {
"environment": "production",
"team": "backend"
},
"attributes": {}
}
'import requests
url = "https://compute.{region}.basaltic.sh/v1/images/{image_id}"
payload = {
"description": "Ubuntu 24.04 LTS (Noble Numbat)",
"current": True,
"eol_date": "2026-08-31",
"tags": {
"environment": "production",
"team": "backend"
},
"attributes": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Ubuntu 24.04 LTS (Noble Numbat)',
current: true,
eol_date: '2026-08-31',
tags: {environment: 'production', team: 'backend'},
attributes: {}
})
};
fetch('https://compute.{region}.basaltic.sh/v1/images/{image_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://compute.{region}.basaltic.sh/v1/images/{image_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Ubuntu 24.04 LTS (Noble Numbat)',
'current' => true,
'eol_date' => '2026-08-31',
'tags' => [
'environment' => 'production',
'team' => 'backend'
],
'attributes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://compute.{region}.basaltic.sh/v1/images/{image_id}"
payload := strings.NewReader("{\n \"description\": \"Ubuntu 24.04 LTS (Noble Numbat)\",\n \"current\": true,\n \"eol_date\": \"2026-08-31\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"attributes\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://compute.{region}.basaltic.sh/v1/images/{image_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Ubuntu 24.04 LTS (Noble Numbat)\",\n \"current\": true,\n \"eol_date\": \"2026-08-31\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"attributes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.{region}.basaltic.sh/v1/images/{image_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Ubuntu 24.04 LTS (Noble Numbat)\",\n \"current\": true,\n \"eol_date\": \"2026-08-31\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"attributes\": {}\n}"
response = http.request(request)
puts response.read_body{
"image": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"crn": "crn:compute:sa-saopaulo-1:my-account:image/ubuntu-24.04/architecture/amd64/version/20260901",
"name": "ubuntu-24.04",
"architecture": "amd64",
"version": "20260807",
"status": "active",
"faults": [
{
"code": "BACKUP_FAILED",
"severity": "error",
"message": "Backup upload failed.",
"details": {},
"first_at": "2023-11-07T05:31:56Z",
"last_at": "2023-11-07T05:31:56Z",
"occurrences": 1
}
],
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z",
"description": "Ubuntu 24.04 LTS (Noble Numbat)",
"os": "ubuntu",
"os_version": "24.04",
"is_current": true,
"eol_date": "2026-08-31",
"size_bytes": 2361393152,
"min_disk_gb": 10,
"min_ram_mb": 1024,
"withdrawal_reason": "end_of_life",
"deletion_retention": {
"reason": "in_use",
"instances": 1,
"instance_pools": 1
},
"tags": {
"environment": "production",
"team": "backend"
},
"attributes": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Actualizar los metadatos de una imagen
La actualización de una imagen de plataforma requiere que un principal actúe en la cuenta de la plataforma con compute:UpdateImage; otras cuentas reciben 403.
curl --request PATCH \
--url https://compute.{region}.basaltic.sh/v1/images/{image_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Ubuntu 24.04 LTS (Noble Numbat)",
"current": true,
"eol_date": "2026-08-31",
"tags": {
"environment": "production",
"team": "backend"
},
"attributes": {}
}
'import requests
url = "https://compute.{region}.basaltic.sh/v1/images/{image_id}"
payload = {
"description": "Ubuntu 24.04 LTS (Noble Numbat)",
"current": True,
"eol_date": "2026-08-31",
"tags": {
"environment": "production",
"team": "backend"
},
"attributes": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Ubuntu 24.04 LTS (Noble Numbat)',
current: true,
eol_date: '2026-08-31',
tags: {environment: 'production', team: 'backend'},
attributes: {}
})
};
fetch('https://compute.{region}.basaltic.sh/v1/images/{image_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://compute.{region}.basaltic.sh/v1/images/{image_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Ubuntu 24.04 LTS (Noble Numbat)',
'current' => true,
'eol_date' => '2026-08-31',
'tags' => [
'environment' => 'production',
'team' => 'backend'
],
'attributes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://compute.{region}.basaltic.sh/v1/images/{image_id}"
payload := strings.NewReader("{\n \"description\": \"Ubuntu 24.04 LTS (Noble Numbat)\",\n \"current\": true,\n \"eol_date\": \"2026-08-31\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"attributes\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://compute.{region}.basaltic.sh/v1/images/{image_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Ubuntu 24.04 LTS (Noble Numbat)\",\n \"current\": true,\n \"eol_date\": \"2026-08-31\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"attributes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.{region}.basaltic.sh/v1/images/{image_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Ubuntu 24.04 LTS (Noble Numbat)\",\n \"current\": true,\n \"eol_date\": \"2026-08-31\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"attributes\": {}\n}"
response = http.request(request)
puts response.read_body{
"image": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"crn": "crn:compute:sa-saopaulo-1:my-account:image/ubuntu-24.04/architecture/amd64/version/20260901",
"name": "ubuntu-24.04",
"architecture": "amd64",
"version": "20260807",
"status": "active",
"faults": [
{
"code": "BACKUP_FAILED",
"severity": "error",
"message": "Backup upload failed.",
"details": {},
"first_at": "2023-11-07T05:31:56Z",
"last_at": "2023-11-07T05:31:56Z",
"occurrences": 1
}
],
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z",
"description": "Ubuntu 24.04 LTS (Noble Numbat)",
"os": "ubuntu",
"os_version": "24.04",
"is_current": true,
"eol_date": "2026-08-31",
"size_bytes": 2361393152,
"min_disk_gb": 10,
"min_ram_mb": 1024,
"withdrawal_reason": "end_of_life",
"deletion_retention": {
"reason": "in_use",
"instances": 1,
"instance_pools": 1
},
"tags": {
"environment": "production",
"team": "backend"
},
"attributes": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}compute:UpdateImage. La actualización de una imagen de plataforma requiere que un principal actúe en la cuenta de la plataforma con compute:UpdateImage; otras cuentas reciben 403. Consulte permisos de computación para obtener ejemplos de directivas.Autorizaciones
Un token bearer de OAuth 2.0, enviado como Authorization: Bearer <token>. Esta es la forma recomendada de autenticación.
Obtén el token intercambiando el par de claves de acceso de una cuenta de servicio en POST /v1/oauth/token con grant_type=client_credentials. Es el flujo estándar de credenciales de cliente; las bibliotecas compatibles con OAuth pueden obtener y renovar el token por ti.
curl -s -u "$KEY_ID:$SECRET" -d grant_type=client_credentials \
https://iam.basaltic.sh/v1/oauth/token
Los tokens duran una hora por defecto. El mismo par de claves de acceso también sirve como credencial AWS SigV4 para el endpoint de objetos compatible con S3, que solo acepta ese método de autenticación.
Parámetros de ruta
ID de imagen
Cuerpo
"Ubuntu 24.04 LTS (Noble Numbat)"
Cambie el puntero resolver por nombre para el nombre de esta imagen. true promueve esta versión a la actual (la acción de cambio / reversión) y degrada cualquier otra que fuera actual para la misma (nombre, arquitectura); false borra el puntero. Solo las imágenes activas pueden ser actualizadas.
true
Establezca la fecha de fin de vida de la versión. Un null explícito lo borra; omitir el campo lo deja sin cambios. La eliminación es importante porque el catálogo retira las imágenes de la plataforma en esta fecha, una que se registró por error tiene que ser removible.
"2026-08-31"
Show child attributes
Show child attributes
{
"environment": "production",
"team": "backend"
}
Show child attributes
Show child attributes
Respuesta
Imagen actualizada
Show child attributes
Show child attributes

