Mappings APIs
출처: 문서
본문
매핑(Mappings) API
다음 API들은 매핑 생성부터 조회, 업데이트에 이르기까지 매핑과 관련된 다양한 작업에 사용할 수 있어요.
매핑 뷰 조회
로그 소스로 사용되는 인덱스에 포함된 필드들의 뷰를 반환해요.
요청 본문 필드
다음 필드들은 필드 매핑을 가져올 때 사용돼요.
| 필드 | 타입 | 설명 |
|---|---|---|
index_name |
String | 로그 수집에 사용되는 인덱스의 이름이에요. |
rule_topic |
String | 인덱스의 로그 타입이에요. |
요청 예시
GET /_plugins/_security_analytics/mappings/view
{
"index_name": "windows",
"rule_topic": "windows"
}
응답 예시
{
"properties": {
"windows-event_data-CommandLine": {
"path": "CommandLine",
"type": "alias"
},
"event_uid": {
"path": "EventID",
"type": "alias"
}
},
"unmapped_index_fields": [
"windows-event_data-CommandLine",
"unmapped_HiveName",
"src_ip",
"sha1",
"processPath",
"CallerProcessName",
"CallTrace",
"AuthenticationPackageName",
"AuditSourceName",
"AuditPolicyChanges",
"AttributeValue",
"AttributeLDAPDisplayName",
"ApplicationPath",
"Application",
"AllowedToDelegateTo",
"Address",
"Action",
"AccountType",
"AccountName",
"Accesses",
"AccessMask",
"AccessList"
]
}
매핑 생성
지정된 인덱스에 대한 필드 별칭 매핑을 생성해요.
요청 예시
POST /_plugins/_security_analytics/mappings
{
"index_name": "windows",
"rule_topic": "windows",
"partial": true,
"alias_mappings": {
"properties": {
"event_uid": {
"type": "alias",
"path": "EventID"
}
}
}
}
응답 예시
{
"acknowledged": true
}
매핑 조회
지정된 인덱스에 대한 필드 별칭 매핑을 조회해요.
경로 파라미터
| 필드 | 타입 | 설명 |
|---|---|---|
index_name |
String | 로그 수집에 사용되는 인덱스의 이름이에요. 필수 값이에요. |
요청 예시
GET /_plugins/_security_analytics/mappings?index_name=windows
응답 예시
{
"windows": {
"mappings": {
"properties": {
"windows-event_data-CommandLine": {
"type": "alias",
"path": "CommandLine"
},
"event_uid": {
"type": "alias",
"path": "EventID"
}
}
}
}
}
매핑 업데이트
지정된 인덱스의 필드 별칭 매핑을 업데이트해요.
요청 예시
PUT /_plugins/_security_analytics/mappings
{
"index_name": "windows",
"field": "CommandLine",
"alias": "windows-event_data-CommandLine"
}
응답 예시
{
"acknowledged": true
}