curl --request POST \
--url https://api.aspect.inc/fs-items/copy \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_directory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"directory_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"symlink_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"include_comments": true,
"include_metadata": true,
"copy_as_proxy": false
}
'import requests
url = "https://api.aspect.inc/fs-items/copy"
payload = {
"destination_directory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"directory_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"symlink_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"include_comments": True,
"include_metadata": True,
"copy_as_proxy": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination_directory_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
asset_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
directory_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
symlink_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
include_comments: true,
include_metadata: true,
copy_as_proxy: false
})
};
fetch('https://api.aspect.inc/fs-items/copy', 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/fs-items/copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'destination_directory_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'asset_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'directory_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'symlink_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'include_comments' => true,
'include_metadata' => true,
'copy_as_proxy' => false
]),
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.aspect.inc/fs-items/copy"
payload := strings.NewReader("{\n \"destination_directory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"symlink_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"include_comments\": true,\n \"include_metadata\": true,\n \"copy_as_proxy\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.aspect.inc/fs-items/copy")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destination_directory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"symlink_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"include_comments\": true,\n \"include_metadata\": true,\n \"copy_as_proxy\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/fs-items/copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination_directory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"symlink_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"include_comments\": true,\n \"include_metadata\": true,\n \"copy_as_proxy\": false\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items_total": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Copy Items
Copy items into a directory as a background job; poll GET /jobs/.
curl --request POST \
--url https://api.aspect.inc/fs-items/copy \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_directory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"directory_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"symlink_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"include_comments": true,
"include_metadata": true,
"copy_as_proxy": false
}
'import requests
url = "https://api.aspect.inc/fs-items/copy"
payload = {
"destination_directory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"directory_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"symlink_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"include_comments": True,
"include_metadata": True,
"copy_as_proxy": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination_directory_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
asset_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
directory_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
symlink_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
include_comments: true,
include_metadata: true,
copy_as_proxy: false
})
};
fetch('https://api.aspect.inc/fs-items/copy', 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/fs-items/copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'destination_directory_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'asset_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'directory_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'symlink_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'include_comments' => true,
'include_metadata' => true,
'copy_as_proxy' => false
]),
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.aspect.inc/fs-items/copy"
payload := strings.NewReader("{\n \"destination_directory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"symlink_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"include_comments\": true,\n \"include_metadata\": true,\n \"copy_as_proxy\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.aspect.inc/fs-items/copy")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destination_directory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"symlink_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"include_comments\": true,\n \"include_metadata\": true,\n \"copy_as_proxy\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/fs-items/copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination_directory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"symlink_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"include_comments\": true,\n \"include_metadata\": true,\n \"copy_as_proxy\": false\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items_total": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.
Body
API request schema for copying filesystem items into a destination directory.
Copying is asynchronous: the endpoint enqueues a copy job and returns its job id, which can be polled via GET /jobs/{job_id}.
ID of the destination parent directory
List of asset IDs to copy
List of directory IDs to copy (recursively, including all nested items)
List of symlink IDs to copy
Whether comment threads (comments, reactions, mentions, and their attachments) carry over to the copied assets
Whether metadata values carry over to the copied assets
Copy videos as their stream proxy: the proxy becomes the copied asset's original. Other asset types copy their original.