커뮤니티 모니터링
Hive 커뮤니티 이외의, 게시글/댓글/게시판 수집 API가 제공되지 않는 커뮤니티를 모니터링할 때 사용하는 API입니다.
사전 준비¶
Hive 콘솔 > AI 서비스 > 커뮤니티 모니터링 > 게시글 모니터링 시스템 > 커뮤니티 설정 메뉴에 접근할 수 있는지 확인하고, 접근이 안 되면 Hive 콘솔 권한 관리 가이드를 참고해 메뉴 접근 권한을 얻습니다. 커뮤니티 모니터링 시스템에서 새 프로젝트를 등록합니다.
게시글·댓글·게시판 정보 등록¶
게시글/댓글/게시판 정보를 배열로 묶어 등록하는 API입니다. 배열의 각 항목은 content(게시글) / comment(댓글) / board(게시판 정보) 중 하나의 키만 가지며, 서로 다른 종류를 섞어 보낼 수 있습니다.
Request URL¶
| 요청 정보 | 값 |
|---|---|
| Live URL | https://hcms-backoffice.withhive.com/api/community/register-community-data |
| Sandbox URL | https://sandbox-hcms-backoffice.withhive.com/api/community/register-community-data |
| Test URL | https://test-hcms-backoffice.withhive.com/api/community/register-community-data |
| HTTP Method | POST |
| Content-Type | application/json |
Request Headers¶
| 필드명 | 설명 | 타입 | 필수 |
|---|---|---|---|
| Content-Type | application/json | String | Y |
| api_key | 발급받은 API Key 값(api_key_1, api_key_2 중 하나) | String | Y |
| game_name | 등록할 게임/프로젝트 식별자 | String | Y |
Request Body¶
content (게시글 등록)¶
| 필드명 | 설명 | 타입 | 필수 |
|---|---|---|---|
| content_idx | 게시글 고유 번호 | Integer | Y |
| lang | 지원 언어 코드 중 하나 | String | Y |
| title | 게시글 제목 | String | Y |
| body | 게시글 본문 | String | Y |
| pid | 작성자 계정 식별자 | String | Y |
| register | 작성자 닉네임 | String | Y |
| regdate | 등록 일시 (yyyy-MM-dd HH | String | Y |
| link | 게시글 원문 URL | String | Y |
comment (댓글 등록)¶
| 필드명 | 설명 | 타입 | 필수 |
|---|---|---|---|
| comment_idx | 댓글 고유 번호 | Integer | Y |
| lang | 지원 언어 코드 중 하나 | String | Y |
| contents_idx | 댓글이 달린 게시글의 content_idx | Integer | Y |
| body | 댓글 본문 | String | Y |
| pid | 작성자 계정 식별자 | String | Y |
| register | 작성자 닉네임 | String | Y |
| regdate | 등록 일시 (yyyy-MM-dd HH | String | Y |
| link | 댓글 URL | String | Y |
board (게시판 정보 등록)¶
| 필드명 | 설명 | 타입 | 필수 |
|---|---|---|---|
| board_idx | 게시판 고유 번호 | Integer | Y |
| lang_code | 지원 언어 코드 중 하나 | String | Y |
| board_name | 게시판 이름 | String | Y |
board는 전체 교체(delete & re-insert) 방식입니다
매번 해당 게임의 **전체 게시판 목록**을 보내야 하며, 일부만 보내면 나머지는 삭제됩니다.
지원 언어 코드¶
ISO 639-1 기반이며, content/comment의 lang, board의 lang_code 필드에 아래 코드 중 하나를 사용합니다.
| 코드 | 언어 (자국어 표기) | 한국어 |
|---|---|---|
| ar | العربية | 아랍어 |
| de | Deutsch | 독일어 |
| en | English | 영어 |
| es | Español | 스페인어 |
| fr | Français | 프랑스어 |
| id | Bahasa Indonesia | 인도네시아어 |
| it | Italiano | 이탈리아어 |
| ja | 日本語 | 일본어 |
| ko | 한국어 | 한국어 |
| pt | Português | 포르투갈어 |
| ru | русский | 러시아어 |
| th | ไทย | 태국어 |
| tr | Türkçe | 터키어 |
| vi | tiếng Việt | 베트남어 |
| zh-hans | 简体中文 | 중국어(간체) |
| zh-hant | 繁體中文 | 중국어(번체) |
Response¶
content/comment/board는 요청에 해당 종류를 포함시킨 경우 응답에 항상 포함됩니다.
| 필드명 | 설명 | 타입 | 필수 |
|---|---|---|---|
| content | { success, failed } 건수 | Object | Y (요청에 content 포함 시) |
| comment | { success, failed } 건수 | Object | Y (요청에 comment 포함 시) |
| board | { success, failed } 건수. 전체 교체 방식이라 부분 성공 없음(success/failed 중 하나는 항상 0) | Object | Y (요청에 board 포함 시) |
| failed_content_idx | 실패한 항목들의 content_idx. 실패 없으면 [] | Array(Integer) | Y (요청에 content 포함 시) |
| failed_comment_idx | 실패한 항목들의 comment_idx. 실패 없으면 [] | Array(Integer) | Y (요청에 comment 포함 시) |
| invalid_index | content/comment/board 중 정확히 하나만 채우지 않은 항목의 배열 위치(0부터 시작) | Array(Integer) | N (형식이 잘못된 항목이 있을 때만) |
백오피스에서 이 프로젝트의 등록 API 사용 토글을 꺼둔 상태라면, 위 필드들 대신 아래와 같은 응답만 200으로 내려오며 데이터는 저장되지 않습니다. 요청 자체는 정상 수신됐다는 뜻입니다.
| 필드명 | 설명 | 타입 | 필수 |
|---|---|---|---|
| active | 항상 false | Boolean | Y (프로젝트가 비활성 상태일 때만) |
| message | 저장되지 않은 이유 설명 | String | Y (프로젝트가 비활성 상태일 때만) |
Response code¶
| 코드 | 설명 |
|---|---|
| 200 | 요청 처리 완료(개별 항목의 실패는 failed_content_idx/failed_comment_idx로 표현되며, 상태 코드는 200입니다) |
| 400 | 요청 배열이 비어 있거나 game_name 헤더가 누락됨 |
| 401 | api_key 헤더가 누락되었거나 발급된 키와 일치하지 않음 |
| 404 | 등록되지 않은 game_name으로 요청함 |
| 500 | DB 저장 실패 등 서버 내부 오류 |
400/401/404 오류 시 응답 본문은 아래와 같이 실패 사유를 담은 단일 객체입니다.
Request example¶
curl -X POST https://hcms-backoffice.withhive.com/api/community/register-community-data \
-H "Content-Type: application/json" \
-H "api_key: {발급받은 API Key}" \
-H "game_name: sample_game" \
-d '[
{
"content": {
"content_idx": 10234,
"lang": "ko",
"title": "업데이트 관련 문의드립니다",
"body": "이번 패치 이후로 접속이 안 됩니다.",
"pid": "player_00123",
"register": "홍길동",
"regdate": "2026-08-24 15:30:00",
"link": "https://community.example.com/sample_game/board/5/10234"
}
},
{
"comment": {
"comment_idx": 55021,
"lang": "ko",
"contents_idx": 10234,
"body": "저도 같은 증상이에요",
"pid": "player_00987",
"register": "이몽룡",
"regdate": "2026-08-24 15:31:10",
"link": "https://community.example.com/sample_game/board/5/10234#comment-55021"
}
},
{
"board": {
"board_idx": 5,
"lang_code": "ko",
"board_name": "자유게시판"
}
}
]'
import java.util.List;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
public class HcmsRealtimeRegisterSample {
private final String apiKey = "<API_KEY>";
private final String gameName = "sample_game";
private final String url = "https://hcms-backoffice.withhive.com/api/community/register-community-data";
public void registerContent() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
String body = "[{\"content\":{"
+ "\"content_idx\":10234,"
+ "\"lang\":\"ko\","
+ "\"title\":\"업데이트 관련 문의드립니다\","
+ "\"body\":\"이번 패치 이후로 접속이 안 됩니다.\","
+ "\"pid\":\"player_00123\","
+ "\"register\":\"홍길동\","
+ "\"regdate\":\"2026-08-24 15:30:00\","
+ "\"link\":\"https://community.example.com/sample_game/board/5/10234\""
+ "}}]";
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "application/json");
headers.set("api_key", apiKey);
headers.set("game_name", gameName);
RestTemplate restTemplate = new RestTemplate();
HttpEntity<String> entity = new HttpEntity<>(body, headers);
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.POST, entity, String.class);
JsonNode result = objectMapper.readTree(response.getBody());
System.out.println(result.toString());
}
}
import requests
api_key = "<API_KEY>"
game_name = "sample_game"
url = "https://hcms-backoffice.withhive.com/api/community/register-community-data"
headers = {
"Content-Type": "application/json",
"api_key": api_key,
"game_name": game_name,
}
body = [
{
"content": {
"content_idx": 10234,
"lang": "ko",
"title": "업데이트 관련 문의드립니다",
"body": "이번 패치 이후로 접속이 안 됩니다.",
"pid": "player_00123",
"register": "홍길동",
"regdate": "2026-08-24 15:30:00",
"link": "https://community.example.com/sample_game/board/5/10234",
}
}
]
response = requests.post(url, headers=headers, json=body)
print(response.json())
Response example¶
{
"content": { "success": 1, "failed": 0 },
"comment": { "success": 1, "failed": 0 },
"board": { "success": 1, "failed": 0 },
"failed_content_idx": [],
"failed_comment_idx": []
}
예: 게시글 5건 중 2건 실패
예: content/comment/board 중 정확히 하나가 아닌 항목
index 1은 content/comment 동시 포함, index 2는 {}(모두 미포함)인 경우입니다.
등록 가능 상태 확인¶
game_name이 위 등록 API를 받을 수 있는 상태인지(등록 여부, API Key 발급 여부) 확인하는 조회 전용 API입니다. api_key 인증이 필요 없습니다.
Request URL¶
Request Headers¶
| 필드명 | 설명 | 타입 | 필수 |
|---|---|---|---|
| game_name | 확인할 게임/프로젝트 식별자 | String | Y |
Response¶
| 필드명 | 설명 | 타입 | 필수 |
|---|---|---|---|
| ready | true면 API Key가 발급되어 있고 프로젝트도 활성 상태라 바로 요청을 받을 수 있음. API Key가 없거나, 발급됐어도 프로젝트가 비활성 상태면 false | boolean | Y |
| message | 상태 설명(키 없음 / 비활성 상태(수신은 되나 저장 안 됨) / 정상 3가지 중 하나) | string | Y |
Response code¶
| 코드 | 설명 |
|---|---|
| 200 | 조회 완료(ready: true/false로 결과 표현) |
| 400 | game_name 헤더 누락 |
| 404 | 등록되지 않은 game_name |
Request example¶
curl -X GET https://hcms-backoffice.withhive.com/api/community/register-community-data/check \
-H "game_name: sample_game"
Response example¶
참고 사항¶
- 배치 범위: 요청 1건은 game_name 헤더로 지정한 게임 하나에만 등록됩니다.
- 중복 방지: 동일 content_idx/comment_idx 재전송 시 중복 저장됩니다(멱등성 처리 없음). board는 전체 교체 방식이라 중복 걱정 없음.
- 본문 길이: body 길이 제한 없음.
- 키 관리: 재발급 시 이전 키는 즉시 무효화됩니다.