Update an image
curl --request PATCH \
--url https://b.anny.co/api/v1/images/{image_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data'import requests
url = "https://b.anny.co/api/v1/images/{image_id}"
payload = "-----011000010111000001101001\r\n-----011000010111000001101001--"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "multipart/form-data"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://b.anny.co/api/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://b.anny.co/api/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 => "-----011000010111000001101001\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://b.anny.co/api/v1/images/{image_id}"
payload := strings.NewReader("-----011000010111000001101001\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://b.anny.co/api/v1/images/{image_id}")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/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.body = "-----011000010111000001101001\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "images",
"attributes": {
"url": "<string>",
"copyright": "<string>",
"width": 123,
"height": 123,
"order_index": 123,
"small_path": "<string>",
"medium_path": "<string>",
"large_path": "<string>",
"thumbnail_url": "<string>",
"mime_type": "<string>",
"is_video": true,
"created_at": "<string>"
},
"links": {
"self": "<string>"
}
}
}Content & Documents
Update an image
PATCH
/
api
/
v1
/
images
/
{image_id}
Update an image
curl --request PATCH \
--url https://b.anny.co/api/v1/images/{image_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data'import requests
url = "https://b.anny.co/api/v1/images/{image_id}"
payload = "-----011000010111000001101001\r\n-----011000010111000001101001--"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "multipart/form-data"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://b.anny.co/api/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://b.anny.co/api/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 => "-----011000010111000001101001\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://b.anny.co/api/v1/images/{image_id}"
payload := strings.NewReader("-----011000010111000001101001\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://b.anny.co/api/v1/images/{image_id}")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/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.body = "-----011000010111000001101001\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "images",
"attributes": {
"url": "<string>",
"copyright": "<string>",
"width": 123,
"height": 123,
"order_index": 123,
"small_path": "<string>",
"medium_path": "<string>",
"large_path": "<string>",
"thumbnail_url": "<string>",
"mime_type": "<string>",
"is_video": true,
"created_at": "<string>"
},
"links": {
"self": "<string>"
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
The image identifier.
Abfrageparameter
Organization ID
Body
multipart/form-dataapplication/vnd.api+json
The body is of type object.
Antwort
200 - application/vnd.api+json
OK
An uploaded image or video with multiple resolution variants.
Show child attributes
Show child attributes
⌘I