Update Collection
Update a collection
curl --request PUT \
--url https://api.aspect.inc/collections/{collection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"appearance_settings": {
"header": {
"show_icon": true,
"icon_emoji": "<string>",
"show_creation_info": true,
"show_description": true,
"show_background": true
}
},
"icon_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clear_icon_attachment": false,
"background_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clear_background_attachment": false
}
'import requests
url = "https://api.aspect.inc/collections/{collection_id}"
payload = {
"name": "<string>",
"description": "<string>",
"appearance_settings": { "header": {
"show_icon": True,
"icon_emoji": "<string>",
"show_creation_info": True,
"show_description": True,
"show_background": True
} },
"icon_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clear_icon_attachment": False,
"background_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clear_background_attachment": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
appearance_settings: {
header: {
show_icon: true,
icon_emoji: '<string>',
show_creation_info: true,
show_description: true,
show_background: true
}
},
icon_attachment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
clear_icon_attachment: false,
background_attachment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
clear_background_attachment: false
})
};
fetch('https://api.aspect.inc/collections/{collection_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.aspect.inc/collections/{collection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'appearance_settings' => [
'header' => [
'show_icon' => true,
'icon_emoji' => '<string>',
'show_creation_info' => true,
'show_description' => true,
'show_background' => true
]
],
'icon_attachment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'clear_icon_attachment' => false,
'background_attachment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'clear_background_attachment' => false
]),
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://api.aspect.inc/collections/{collection_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"appearance_settings\": {\n \"header\": {\n \"show_icon\": true,\n \"icon_emoji\": \"<string>\",\n \"show_creation_info\": true,\n \"show_description\": true,\n \"show_background\": true\n }\n },\n \"icon_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_icon_attachment\": false,\n \"background_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_background_attachment\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.aspect.inc/collections/{collection_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"appearance_settings\": {\n \"header\": {\n \"show_icon\": true,\n \"icon_emoji\": \"<string>\",\n \"show_creation_info\": true,\n \"show_description\": true,\n \"show_background\": true\n }\n },\n \"icon_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_icon_attachment\": false,\n \"background_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_background_attachment\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/collections/{collection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"appearance_settings\": {\n \"header\": {\n \"show_icon\": true,\n \"icon_emoji\": \"<string>\",\n \"show_creation_info\": true,\n \"show_description\": true,\n \"show_background\": true\n }\n },\n \"icon_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_icon_attachment\": false,\n \"background_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_background_attachment\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"actions": 123,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appearance_settings": {
"header": {
"height": "small",
"show_icon": true,
"show_creation_info": true,
"show_description": true,
"show_background": true,
"icon": {
"type": "emoji",
"emoji": "<string>",
"color": "<string>",
"url": "<string>",
"upload": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"uploaded": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z"
}
},
"background_attachment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"uploaded": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z"
}
}
},
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"description": "<string>",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"num_assets": 0,
"num_directories": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
JWT in Authorization header. 'Bearer ' prefix optional.
Path Parameters
Body
API request schema for updating a collection
New name for the collection
New description for the collection
Appearance settings
Show child attributes
Show child attributes
Attachment ID for icon image
Clear the icon attachment
Attachment ID for background image
Clear the background attachment
Response
Successful Response
API response schema for creating a collection
Collection ID
Collection name
User's permission bitmap on this collection
Project ID
Appearance settings with attachments
Show child attributes
Show child attributes
Creation timestamp
Last update timestamp
Collection description
User who created this collection
User who created this collection
Show child attributes
Show child attributes
Number of assets in the collection
Number of directories in the collection
curl --request PUT \
--url https://api.aspect.inc/collections/{collection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"appearance_settings": {
"header": {
"show_icon": true,
"icon_emoji": "<string>",
"show_creation_info": true,
"show_description": true,
"show_background": true
}
},
"icon_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clear_icon_attachment": false,
"background_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clear_background_attachment": false
}
'import requests
url = "https://api.aspect.inc/collections/{collection_id}"
payload = {
"name": "<string>",
"description": "<string>",
"appearance_settings": { "header": {
"show_icon": True,
"icon_emoji": "<string>",
"show_creation_info": True,
"show_description": True,
"show_background": True
} },
"icon_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clear_icon_attachment": False,
"background_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clear_background_attachment": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
appearance_settings: {
header: {
show_icon: true,
icon_emoji: '<string>',
show_creation_info: true,
show_description: true,
show_background: true
}
},
icon_attachment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
clear_icon_attachment: false,
background_attachment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
clear_background_attachment: false
})
};
fetch('https://api.aspect.inc/collections/{collection_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.aspect.inc/collections/{collection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'appearance_settings' => [
'header' => [
'show_icon' => true,
'icon_emoji' => '<string>',
'show_creation_info' => true,
'show_description' => true,
'show_background' => true
]
],
'icon_attachment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'clear_icon_attachment' => false,
'background_attachment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'clear_background_attachment' => false
]),
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://api.aspect.inc/collections/{collection_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"appearance_settings\": {\n \"header\": {\n \"show_icon\": true,\n \"icon_emoji\": \"<string>\",\n \"show_creation_info\": true,\n \"show_description\": true,\n \"show_background\": true\n }\n },\n \"icon_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_icon_attachment\": false,\n \"background_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_background_attachment\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.aspect.inc/collections/{collection_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"appearance_settings\": {\n \"header\": {\n \"show_icon\": true,\n \"icon_emoji\": \"<string>\",\n \"show_creation_info\": true,\n \"show_description\": true,\n \"show_background\": true\n }\n },\n \"icon_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_icon_attachment\": false,\n \"background_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_background_attachment\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/collections/{collection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"appearance_settings\": {\n \"header\": {\n \"show_icon\": true,\n \"icon_emoji\": \"<string>\",\n \"show_creation_info\": true,\n \"show_description\": true,\n \"show_background\": true\n }\n },\n \"icon_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_icon_attachment\": false,\n \"background_attachment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clear_background_attachment\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"actions": 123,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appearance_settings": {
"header": {
"height": "small",
"show_icon": true,
"show_creation_info": true,
"show_description": true,
"show_background": true,
"icon": {
"type": "emoji",
"emoji": "<string>",
"color": "<string>",
"url": "<string>",
"upload": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"uploaded": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z"
}
},
"background_attachment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"uploaded": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z"
}
}
},
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"description": "<string>",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"num_assets": 0,
"num_directories": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
