Get avatar
Returns the owner’s avatar image (WebP), publicly. 404 when unset.
curl --request GET \
--url https://api.example.com/avatars/workspaces/{id}/{version}import requests
url = "https://api.example.com/avatars/workspaces/{id}/{version}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/avatars/workspaces/{id}/{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://api.example.com/avatars/workspaces/{id}/{version}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/avatars/workspaces/{id}/{version}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/avatars/workspaces/{id}/{version}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/avatars/workspaces/{id}/{version}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"message": "<string>",
"name": "<string>"
}Path Parameters
Opaque id of the avatar's owner.
Content-hash version segment identifying the exact stored object.
Response
The serialized shape of an HTTP error: the inert wire/OpenAPI-schema view
that Error [blocked] renders to at the response boundary.
It carries no builder logic — Error [blocked] is the type handlers construct and
thread through Result, and it builds an ErrorResponse directly in its
IntoResponse impl. context and status are not part of the JSON body
(context is logged, status sets the HTTP status line).
The serialized shape of an HTTP error: the inert wire/OpenAPI-schema view
that Error [blocked] renders to at the response boundary.
It carries no builder logic — Error [blocked] is the type handlers construct and
thread through Result, and it builds an ErrorResponse directly in its
IntoResponse impl. context and status are not part of the JSON body
(context is logged, status sets the HTTP status line).
curl --request GET \
--url https://api.example.com/avatars/workspaces/{id}/{version}import requests
url = "https://api.example.com/avatars/workspaces/{id}/{version}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/avatars/workspaces/{id}/{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://api.example.com/avatars/workspaces/{id}/{version}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/avatars/workspaces/{id}/{version}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/avatars/workspaces/{id}/{version}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/avatars/workspaces/{id}/{version}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"message": "<string>",
"name": "<string>"
}