대용량 템플릿 패키지 업로드 URL 발급
curl --request GET \
--url https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url \
--header 'edicus-api-key: <api-key>'import requests
url = "https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url"
headers = {"edicus-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'edicus-api-key': '<api-key>'}};
fetch('https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url', 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-upload-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"edicus-api-key: <api-key>"
],
]);
$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-upload-url"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url")
.header("edicus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["edicus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"upload_url": "https://storage.googleapis.com/...",
"filename": "SyGN0Dge3D.zip"
}{
"code": "invalid-edicus-api-key"
}{}템플릿
대용량 템플릿 패키지 업로드 URL 발급
32MB가 넘는 템플릿 패키지를 올릴 수 있는 URL을 발급받는다. 발급받은 URL은 30분 동안만 유효하다.
업로드 방법:
- 패키지를 zip으로 묶는다.
upload_url에PUT으로 올린다.Content-Type: application/x-zip-compressed를 반드시 지킨다.- 업로드 완료 통지를 호출해야 등록이 끝난다.
GET
/
resapi
/
pkg-upload-url
대용량 템플릿 패키지 업로드 URL 발급
curl --request GET \
--url https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url \
--header 'edicus-api-key: <api-key>'import requests
url = "https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url"
headers = {"edicus-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'edicus-api-key': '<api-key>'}};
fetch('https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url', 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-upload-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"edicus-api-key: <api-key>"
],
]);
$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-upload-url"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url")
.header("edicus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://resource-dot-edicusbase.appspot.com/resapi/pkg-upload-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["edicus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"upload_url": "https://storage.googleapis.com/...",
"filename": "SyGN0Dge3D.zip"
}{
"code": "invalid-edicus-api-key"
}{}