템플릿 패키지 업로드 완료 통지
curl --request POST \
--url https://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded \
--header 'edicus-api-key: <api-key>' \
--header 'filename: <filename>'import requests
url = "https://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded"
headers = {
"filename": "<filename>",
"edicus-api-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {filename: '<filename>', 'edicus-api-key': '<api-key>'}
};
fetch('https://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded', 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://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded",
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>",
"filename: <filename>"
],
]);
$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://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("filename", "<filename>")
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://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded")
.header("filename", "<filename>")
.header("edicus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["filename"] = '<filename>'
request["edicus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"template_uri": "gcs://template/partners/motion1/res/template/284.json",
"layout_uris": [],
"res_uris": []
}{
"code": "invalid-edicus-api-key"
}{}템플릿
템플릿 패키지 업로드 완료 통지
발급받은 업로드 URL에 파일을 성공적으로 올렸음을 알리고 등록을 완료한다. 이 호출까지 성공해야 템플릿 업로드가 끝난 것이다.
응답은 템플릿 패키지 업로드와 같다.
POST
/
resapi
/
pkg-uploaded
템플릿 패키지 업로드 완료 통지
curl --request POST \
--url https://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded \
--header 'edicus-api-key: <api-key>' \
--header 'filename: <filename>'import requests
url = "https://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded"
headers = {
"filename": "<filename>",
"edicus-api-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {filename: '<filename>', 'edicus-api-key': '<api-key>'}
};
fetch('https://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded', 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://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded",
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>",
"filename: <filename>"
],
]);
$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://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("filename", "<filename>")
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://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded")
.header("filename", "<filename>")
.header("edicus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://resource-dot-edicusbase.appspot.com/resapi/pkg-uploaded")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["filename"] = '<filename>'
request["edicus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"template_uri": "gcs://template/partners/motion1/res/template/284.json",
"layout_uris": [],
"res_uris": []
}{
"code": "invalid-edicus-api-key"
}{}Authorizations
모션원에서 발급받는 API 키입니다. 외부에 유출되지 않도록 각별히 주의합니다.
Headers
업로드 URL 발급 응답의 filename 값을 그대로 넘긴다.
Response
성공.
등록된 템플릿의 uri. 편집기 띄우기의 입력으로 쓴다
download-json: true일 때만. 변환이 끝난 edicus-doc
등록되지 않은 폰트를 사용한 경우. 빈 배열이어야 정상이다
Show child attributes
Show child attributes
해석되지 않은 font group id. 빈 배열이어야 정상이다