프로필 복호화 조회
curl --request GET \
--url https://sajuapi.dev/v1/profiles/{id}/unmasked \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/profiles/{id}/unmasked"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/profiles/{id}/unmasked', 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://sajuapi.dev/v1/profiles/{id}/unmasked",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-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://sajuapi.dev/v1/profiles/{id}/unmasked"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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://sajuapi.dev/v1/profiles/{id}/unmasked")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/profiles/{id}/unmasked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body프로필 복호화 조회
GET
/
v1
/
profiles
/
{id}
/
unmasked
프로필 복호화 조회
curl --request GET \
--url https://sajuapi.dev/v1/profiles/{id}/unmasked \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/profiles/{id}/unmasked"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/profiles/{id}/unmasked', 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://sajuapi.dev/v1/profiles/{id}/unmasked",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-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://sajuapi.dev/v1/profiles/{id}/unmasked"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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://sajuapi.dev/v1/profiles/{id}/unmasked")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/profiles/{id}/unmasked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyv1 Enterprise API (Coming Soon)이 엔드포인트는 Enterprise 버전에서 제공될 예정입니다.
현재는 v0 API를 사용하세요.
이 엔드포인트는 민감한 개인정보(이름, 생년월일)를 평문으로 반환합니다. 모든 요청은 자동으로 감사 로그에 기록되며, 비정상적인 접근 패턴은 보안 검토 대상이 됩니다.
Path 파라미터
string
required
조회할 프로필의 ID입니다.
prf_ 접두사로 시작합니다.Response
성공
프로필 복호화 조회에 성공하면 마스킹되지 않은 원본 데이터가 포함된 Profile 객체가 반환됩니다.실패
| 상태 코드 | 에러 타입 | 설명 |
|---|---|---|
| 401 | authentication_error | API 키가 유효하지 않음 |
| 403 | forbidden | 복호화 권한이 없음 |
| 404 | not_found | 프로필을 찾을 수 없음 |
| 429 | rate_limited | 요청 한도 초과 |
요청 예시
curl -X GET https://api.sajuapi.dev/v1/profiles/prf_abc123def456/unmasked \
-H "X-API-Key: bs_live_xxx"
const response = await fetch(
'https://api.sajuapi.dev/v1/profiles/prf_abc123def456/unmasked',
{
headers: {
'X-API-Key': 'bs_live_xxx'
}
}
);
const profile = await response.json();
import requests
response = requests.get(
'https://api.sajuapi.dev/v1/profiles/prf_abc123def456/unmasked',
headers={'X-API-Key': 'bs_live_xxx'}
)
profile = response.json()
응답 예시
{
"id": "prf_abc123def456",
"external_id": "user_12345",
"name": "김철수",
"birth_year": 1990,
"birth_month": 3,
"birth_day": 15,
"birth_hour": 14,
"gender": "male",
"day_master": "병화",
"day_master_element": "fire",
"weakest_element": "water",
"saju": {
"pillars": {
"year": {
"stem": "경",
"stem_hanja": "庚",
"branch": "오",
"branch_hanja": "午",
"element": "metal"
},
"month": {
"stem": "기",
"stem_hanja": "己",
"branch": "묘",
"branch_hanja": "卯",
"element": "earth"
},
"day": {
"stem": "병",
"stem_hanja": "丙",
"branch": "인",
"branch_hanja": "寅",
"element": "fire"
},
"hour": {
"stem": "을",
"stem_hanja": "乙",
"branch": "미",
"branch_hanja": "未",
"element": "wood"
}
},
"day_master": {
"name": "병화",
"hanja": "丙火",
"element": "fire",
"description": "태양과 같은 밝고 뜨거운 기운을 가진 일주입니다."
},
"elements": {
"wood": 2,
"fire": 3,
"earth": 1,
"metal": 1,
"water": 1
},
"weakest_element": "water",
"strongest_element": "fire"
},
"created_at": "2025-01-15T09:00:00Z",
"updated_at": "2025-01-15T09:00:00Z"
}
Unmasked Profile 객체
일반 Profile 조회와 달리 다음 필드가 원본 값으로 반환됩니다.| 필드 | 타입 | 설명 |
|---|---|---|
name | string | 사용자 이름 원본입니다. (마스킹 없음) |
birth_year | integer | 출생 연도 원본입니다. |
birth_month | integer | 출생 월 원본입니다. |
birth_day | integer | 출생 일 원본입니다. |
birth_hour | integer | 출생 시 원본입니다. 값이 없으면 null입니다. |
saju | object | 완전한 사주팔자 정보입니다. |
Saju 객체
| 필드 | 타입 | 설명 |
|---|---|---|
pillars | object | 사주(四柱) 정보입니다. 연주, 월주, 일주, 시주를 포함합니다. |
pillars.year | object | 연주(年柱) 정보입니다. |
pillars.month | object | 월주(月柱) 정보입니다. |
pillars.day | object | 일주(日柱) 정보입니다. |
pillars.hour | object | 시주(時柱) 정보입니다. birth_hour가 없으면 null입니다. |
day_master | object | 일간(日干) 정보입니다. |
elements | object | 오행별 분포입니다. |
weakest_element | string | 가장 약한 오행입니다. |
strongest_element | string | 가장 강한 오행입니다. |
감사 로그
모든 복호화 요청은 자동으로 감사 로그에 기록됩니다.{
"action": "profile.unmasked",
"resource_type": "profile",
"resource_id": "prf_abc123def456",
"actor_ip": "203.0.113.42",
"actor_api_key": "bs_live_xxx...",
"request_id": "req_xyz789",
"created_at": "2025-01-16T15:00:00Z"
}
복호화 요청 빈도가 비정상적으로 높은 경우 보안 알림이 발생할 수 있습니다. 필요한 경우에만 이 엔드포인트를 사용하고, 가능하면 마스킹된 데이터를 사용하세요.
⌘I