API Command Examples
템플릿 기준 실전 검증용 cURL 명령 모음입니다. 운영 전 private 저장소 값으로 교체하세요.
BASE_URL=http://127.0.0.1:8787AUTOMATION_KEY=replace-with-real-keyINTEGRATION_TOKEN=replace-with-real-token1) Health / Public
No Authcurl -s "$BASE_URL/health"
curl -s "$BASE_URL/api/public/posts"
curl -s "$BASE_URL/api/public/posts/top?limit=5"
curl -s "$BASE_URL/api/public/search?q=cloudflare"
curl -s "$BASE_URL/api/public/categories"
curl -s "$BASE_URL/api/public/site-settings"
curl -s "$BASE_URL/rss.xml"
curl -s "$BASE_URL/sitemap.xml"
2) Admin Login / Session
Session Cookiecurl -i -c cookie.txt \
-H "Content-Type: application/json" \
-d '{"email":"admin@example.com","password":"change-me"}' \
"$BASE_URL/api/admin/login"
curl -s -b cookie.txt "$BASE_URL/api/admin/session"
curl -s -b cookie.txt "$BASE_URL/api/admin/posts"
3) Admin Post Upsert (Automation)
x-automation-keycurl -s -X POST \
-H "Content-Type: application/json" \
-H "x-automation-key: $AUTOMATION_KEY" \
-d '{
"title":"템플릿 자동화 게시글",
"slug":"template-automation-post",
"content":"자동화 업서트 테스트 본문",
"status":"draft"
}' \
"$BASE_URL/api/admin/posts/upsert-by-slug"
4) Blogger-Compatible API
x-automation-key or Sessioncurl -s \
-H "x-automation-key: $AUTOMATION_KEY" \
"$BASE_URL/api/blogger/v3/blogs/self/posts?maxResults=10&status=all"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "x-automation-key: $AUTOMATION_KEY" \
-d '{
"title":"Blogger 호환 포스트",
"content":"Blogger API 호환 경로 테스트",
"labels":["automation","seo"]
}' \
"$BASE_URL/api/blogger/v3/blogs/self/posts"
5) Integrations API
Integration Auth Requiredcurl -s \
-H "Authorization: Bearer $INTEGRATION_TOKEN" \
"$BASE_URL/api/integrations/posts"
curl -s \
-H "Authorization: Bearer $INTEGRATION_TOKEN" \
"$BASE_URL/api/integrations/prompt-catalog"
curl -s \
-H "Authorization: Bearer $INTEGRATION_TOKEN" \
"$BASE_URL/api/integrations/automation-plan?recent=true&limit=20"