Presigned URL 발급
curl --request POST \
--url https://openapi.pluuug.com/v1/presigned \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Signature: <api-key>' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://openapi.pluuug.com/v1/presigned"
payload = { "name": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'X-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>'})
};
fetch('https://openapi.pluuug.com/v1/presigned', 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://openapi.pluuug.com/v1/presigned",
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([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Signature: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.pluuug.com/v1/presigned"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-Signature", "<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://openapi.pluuug.com/v1/presigned")
.header("X-API-Key", "<api-key>")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.pluuug.com/v1/presigned")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>",
"path": "<string>"
}{
"nonField": [
"<string>"
],
"name": [
"<string>"
]
}Presigned URL
Presigned URL 발급
S3 업로드용 presigned PUT URL을 발급합니다.
사용 흐름:
- 이 API를 호출하여 presigned URL과 path를 발급받습니다.
- 응답의
url로 파일을 직접 업로드합니다. (PUT 요청, Content-Type: 파일 MIME 타입, Body: 파일 바이너리) - 응답의
path를 의뢰 생성/수정 API의file_set[].file필드에 전달합니다.
제약 사항:
- 허용 확장자: pdf, doc, docx, xls, xlsx, ppt, pptx, hwp, jpg, jpeg, png, gif, zip
- presigned URL 유효 시간: 60초
- 파일당 1회 호출 필요
POST
/
v1
/
presigned
Presigned URL 발급
curl --request POST \
--url https://openapi.pluuug.com/v1/presigned \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Signature: <api-key>' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://openapi.pluuug.com/v1/presigned"
payload = { "name": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'X-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>'})
};
fetch('https://openapi.pluuug.com/v1/presigned', 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://openapi.pluuug.com/v1/presigned",
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([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Signature: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.pluuug.com/v1/presigned"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-Signature", "<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://openapi.pluuug.com/v1/presigned")
.header("X-API-Key", "<api-key>")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.pluuug.com/v1/presigned")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>",
"path": "<string>"
}{
"nonField": [
"<string>"
],
"name": [
"<string>"
]
}Authorizations
HMAC-SHA256 방식으로 body를 secret key로 해싱하여 생성한 서명을 넣어야 합니다. 서버는 X-API-Key와 대응되는 secret key로 서명을 검증합니다.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
파일명 (확장자 포함)
Required string length:
1 - 512⌘I