Update project file metadata
curl --request PATCH \
--url https://api.example.com/api/v1/project-files/{file_uuid} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"compression": "<string>",
"include_images": true,
"include_snapshots": true,
"is_read_only": true,
"keep_compute_ids": true,
"project_name": "<string>",
"reset_mac_addresses": true,
"version_tag": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/project-files/{file_uuid}"
payload = {
"compression": "<string>",
"include_images": True,
"include_snapshots": True,
"is_read_only": True,
"keep_compute_ids": True,
"project_name": "<string>",
"reset_mac_addresses": True,
"version_tag": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
compression: '<string>',
include_images: true,
include_snapshots: true,
is_read_only: true,
keep_compute_ids: true,
project_name: '<string>',
reset_mac_addresses: true,
version_tag: '<string>'
})
};
fetch('https://api.example.com/api/v1/project-files/{file_uuid}', 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.example.com/api/v1/project-files/{file_uuid}",
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([
'compression' => '<string>',
'include_images' => true,
'include_snapshots' => true,
'is_read_only' => true,
'keep_compute_ids' => true,
'project_name' => '<string>',
'reset_mac_addresses' => true,
'version_tag' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.example.com/api/v1/project-files/{file_uuid}"
payload := strings.NewReader("{\n \"compression\": \"<string>\",\n \"include_images\": true,\n \"include_snapshots\": true,\n \"is_read_only\": true,\n \"keep_compute_ids\": true,\n \"project_name\": \"<string>\",\n \"reset_mac_addresses\": true,\n \"version_tag\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.example.com/api/v1/project-files/{file_uuid}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"compression\": \"<string>\",\n \"include_images\": true,\n \"include_snapshots\": true,\n \"is_read_only\": true,\n \"keep_compute_ids\": true,\n \"project_name\": \"<string>\",\n \"reset_mac_addresses\": true,\n \"version_tag\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/project-files/{file_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"compression\": \"<string>\",\n \"include_images\": true,\n \"include_snapshots\": true,\n \"is_read_only\": true,\n \"keep_compute_ids\": true,\n \"project_name\": \"<string>\",\n \"reset_mac_addresses\": true,\n \"version_tag\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"blob_sha256": "<string>",
"bucket_id": "<string>",
"compression": "<string>",
"content_type": "<string>",
"created_at": "<string>",
"file_uuid": "<string>",
"filename": "<string>",
"include_images": true,
"include_snapshots": true,
"is_read_only": true,
"keep_compute_ids": true,
"owner_id": "<string>",
"project_id": "<string>",
"project_name": "<string>",
"reset_mac_addresses": true,
"size_bytes": 123,
"updated_at": "<string>",
"version_tag": "<string>"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}project-files
Update project file metadata
Patches project_files fields (project_name, version_tag, is_read_only, export flags, compression). Requires write permission on the file.
PATCH
/
api
/
v1
/
project-files
/
{file_uuid}
Update project file metadata
curl --request PATCH \
--url https://api.example.com/api/v1/project-files/{file_uuid} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"compression": "<string>",
"include_images": true,
"include_snapshots": true,
"is_read_only": true,
"keep_compute_ids": true,
"project_name": "<string>",
"reset_mac_addresses": true,
"version_tag": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/project-files/{file_uuid}"
payload = {
"compression": "<string>",
"include_images": True,
"include_snapshots": True,
"is_read_only": True,
"keep_compute_ids": True,
"project_name": "<string>",
"reset_mac_addresses": True,
"version_tag": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
compression: '<string>',
include_images: true,
include_snapshots: true,
is_read_only: true,
keep_compute_ids: true,
project_name: '<string>',
reset_mac_addresses: true,
version_tag: '<string>'
})
};
fetch('https://api.example.com/api/v1/project-files/{file_uuid}', 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.example.com/api/v1/project-files/{file_uuid}",
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([
'compression' => '<string>',
'include_images' => true,
'include_snapshots' => true,
'is_read_only' => true,
'keep_compute_ids' => true,
'project_name' => '<string>',
'reset_mac_addresses' => true,
'version_tag' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.example.com/api/v1/project-files/{file_uuid}"
payload := strings.NewReader("{\n \"compression\": \"<string>\",\n \"include_images\": true,\n \"include_snapshots\": true,\n \"is_read_only\": true,\n \"keep_compute_ids\": true,\n \"project_name\": \"<string>\",\n \"reset_mac_addresses\": true,\n \"version_tag\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.example.com/api/v1/project-files/{file_uuid}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"compression\": \"<string>\",\n \"include_images\": true,\n \"include_snapshots\": true,\n \"is_read_only\": true,\n \"keep_compute_ids\": true,\n \"project_name\": \"<string>\",\n \"reset_mac_addresses\": true,\n \"version_tag\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/project-files/{file_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"compression\": \"<string>\",\n \"include_images\": true,\n \"include_snapshots\": true,\n \"is_read_only\": true,\n \"keep_compute_ids\": true,\n \"project_name\": \"<string>\",\n \"reset_mac_addresses\": true,\n \"version_tag\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"blob_sha256": "<string>",
"bucket_id": "<string>",
"compression": "<string>",
"content_type": "<string>",
"created_at": "<string>",
"file_uuid": "<string>",
"filename": "<string>",
"include_images": true,
"include_snapshots": true,
"is_read_only": true,
"keep_compute_ids": true,
"owner_id": "<string>",
"project_id": "<string>",
"project_name": "<string>",
"reset_mac_addresses": true,
"size_bytes": 123,
"updated_at": "<string>",
"version_tag": "<string>"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}{
"code": "unauthorized",
"details": "invalid or missing join token",
"error": "Unauthorized"
}Authorizations
Type "Bearer" followed by a space and JWT token.
Path Parameters
File UUID
Body
application/json
Update request
Response
OK
Available options:
pending, uploading, available, tombstoned, deleted ⌘I