Skip to content

Log Ingest API Document

강찬욱 edited this page Aug 21, 2025 · 3 revisions

Log-Streaming Server API 명세서

1. POST /log-mate/logs/springboot/{agentId}/{thNum}

스프링 부트 로그를 업로드합니다.

POST /log-mate/logs/springboot/{agentId}/{thNum}
Content-Type: application/json

🔸 Path Variables

변수명 타입 설명
agentId String 로그를 수집한 에이전트 ID
thNum int 로그를 수집한 쓰레드 번호

🔸 Request Body

{
  "formatCorrect": true,
  "timestamp": "2025-08-20T20:00:00",
  "level": "INFO",
  "thread": "main",
  "logger": "com.example.MyService",
  "message": "DB 연결 성공",
  "userCode": "team-core"
}

🔸 Response

  • HTTP Status: 200 OK
  • 설명: 요청이 성공적으로 처리되었으며, 응답 본문은 없습니다.

2. POST /log-mate/logs/tomcat/{agentId}/{thNum}

Tomcat 액세스 로그를 업로드합니다.

POST /log-mate/logs/tomcat/{agentId}/{thNum}
Content-Type: application/json

🔸 Path Variables

변수명 타입 설명
agentId String 로그를 수집한 에이전트 ID
thNum int 로그를 수집한 쓰레드 번호

🔸 Request Body

{
  "formatCorrect": true,
  "ip": "192.168.0.1",
  "timestamp": "2025-08-20T20:00:00",
  "method": "GET",
  "url": "/api/v1/users",
  "protocol": "HTTP/1.1",
  "statusCode": 200,
  "responseSize": 512,
  "referer": "https://example.com",
  "userAgent": "Mozilla/5.0",
  "extra": "..."
}

🔸 Response

  • HTTP Status: 200 OK
  • 설명: 요청이 성공적으로 처리되었으며, 응답 본문은 없습니다.

Clone this wiki locally