프로젝트 복제 (동기)
curl --request POST \
--url https://api.edicus.io/v2/projects/{project_id}/clone \
--header 'edicus-api-key: <api-key>' \
--header 'edicus-uid: <edicus-uid>'import requests
url = "https://api.edicus.io/v2/projects/{project_id}/clone"
headers = {
"edicus-uid": "<edicus-uid>",
"edicus-api-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'edicus-uid': '<edicus-uid>', 'edicus-api-key': '<api-key>'}
};
fetch('https://api.edicus.io/v2/projects/{project_id}/clone', 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.edicus.io/v2/projects/{project_id}/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"edicus-api-key: <api-key>",
"edicus-uid: <edicus-uid>"
],
]);
$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.edicus.io/v2/projects/{project_id}/clone"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("edicus-uid", "<edicus-uid>")
req.Header.Add("edicus-api-key", "<api-key>")
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.edicus.io/v2/projects/{project_id}/clone")
.header("edicus-uid", "<edicus-uid>")
.header("edicus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edicus.io/v2/projects/{project_id}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["edicus-uid"] = '<edicus-uid>'
request["edicus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"project_id": "-LEnOT7xY0ZJgXAVfc0p",
"preview_tns": [
{
"url": "https://.../1.jpg"
}
]
}프로젝트
프로젝트 복제 (동기)
프로젝트를 복제하고 새 프로젝트 id와 프리뷰 썸네일 목록을 반환합니다. 복제된 프로젝트의 제목에는 (복제됨)이 붙습니다.
edicus-target-uid를 주면 그 사용자에게 복제되고, 없으면 edicus-uid와 같은 사용자에게 복제됩니다.
같은 원본에 복제 요청이 동시에 들어와도 서버가 막지 않습니다. 중복 요청을 막아야 하면 호출하는 쪽에서 처리합니다.
포토북처럼 이미지가 많은 프로젝트는 복제에 수십 초 이상 걸려 타임아웃이 날 수 있습니다. 그런 경우 비동기 복제를 씁니다.
POST
/
v2
/
projects
/
{project_id}
/
clone
프로젝트 복제 (동기)
curl --request POST \
--url https://api.edicus.io/v2/projects/{project_id}/clone \
--header 'edicus-api-key: <api-key>' \
--header 'edicus-uid: <edicus-uid>'import requests
url = "https://api.edicus.io/v2/projects/{project_id}/clone"
headers = {
"edicus-uid": "<edicus-uid>",
"edicus-api-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'edicus-uid': '<edicus-uid>', 'edicus-api-key': '<api-key>'}
};
fetch('https://api.edicus.io/v2/projects/{project_id}/clone', 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.edicus.io/v2/projects/{project_id}/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"edicus-api-key: <api-key>",
"edicus-uid: <edicus-uid>"
],
]);
$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.edicus.io/v2/projects/{project_id}/clone"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("edicus-uid", "<edicus-uid>")
req.Header.Add("edicus-api-key", "<api-key>")
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.edicus.io/v2/projects/{project_id}/clone")
.header("edicus-uid", "<edicus-uid>")
.header("edicus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edicus.io/v2/projects/{project_id}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["edicus-uid"] = '<edicus-uid>'
request["edicus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"project_id": "-LEnOT7xY0ZJgXAVfc0p",
"preview_tns": [
{
"url": "https://.../1.jpg"
}
]
}Authorizations
모션원에서 발급받는 API 키입니다. 외부에 유출되지 않도록 각별히 주의합니다.
Headers
고객사가 사용자에게 부여한 고유 id입니다. 1~70자이고 a-z, A-Z, 0-9, _, !, @, -, +, =만 쓸 수 있습니다. 없거나 규칙을 어기면 400 invalid_request입니다.
Required string length:
1 - 70Pattern:
^[a-zA-Z0-9_!@\-+=]+$복제본을 받을 사용자의 uid입니다. 생략하면 edicus-uid와 같습니다. 형식 규칙은 edicus-uid와 같습니다.
Required string length:
1 - 70Pattern:
^[a-zA-Z0-9_!@\-+=]+$Path Parameters
프로젝트 id
Minimum string length:
1