# S3 Sources (Beta)

## 개요

{% hint style="info" %}
S3 Sources API 엔드포인트는 Panther 버전 1.122부터 오픈 베타로 제공되며, 모든 고객이 사용할 수 있습니다. 버그 신고 및 기능 요청은 Panther 지원 팀과 공유해 주세요.
{% endhint %}

이 API 작업을 사용하여 [S3 소스](/ko/data-onboarding/data-transports/aws/s3.md) 와 Panther에서 상호작용하세요.

## 필수 권한

* \~의 경우 `GET` 작업의 경우, API 토큰에 다음 권한이 있어야 합니다. `로그 소스 보기` 권한.
* \~의 경우 `POST`, `PUT`, 그리고 `DELETE` 작업의 경우, API 토큰에 다음 권한이 있어야 합니다. `로그 소스 관리` 권한.

## POST /log-sources/s3

> create s3 source

```json
{"openapi":"3.0.3","info":{"title":"Panther REST API","version":"1.0"},"tags":[{"name":"s3 source","description":"The S3 source API handles all operations for AWS S3 log sources"}],"servers":[{"url":"https://{api_host}","variables":{"api_host":{"default":"your-api-host"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"S3SourceAPI.CreateS3Source":{"type":"object","properties":{"awsAccountId":{"type":"string","description":"The 12-digit AWS account ID where the S3 bucket resides"},"integrationLabel":{"type":"string","description":"The integration label (name)"},"kmsKey":{"type":"string","description":"KMS key ARN for server-side encryption. Omit if the bucket is not KMS-encrypted."},"logProcessingRole":{"type":"string","description":"The IAM role ARN that Panther assumes to read from the S3 bucket"},"logStreamType":{"type":"string","description":"The log stream type. Supported: Auto, JSON, JsonArray, Lines, XML, CloudWatchLogs","enum":["Auto","JSON","JsonArray","Lines","XML","CloudWatchLogs"]},"logStreamTypeOptions":{"$ref":"#/components/schemas/S3SourceAPI.S3LogStreamTypeOptions"},"managedBucketNotifications":{"type":"boolean","description":"Whether Panther should configure the S3 bucket notifications automatically"},"s3Bucket":{"type":"string","description":"The S3 bucket name"},"s3PrefixLogTypes":{"type":"array","items":{"$ref":"#/components/schemas/S3SourceAPI.PrefixLogTypesMapping"},"description":"Prefix-based log type mappings for parsing ingested data"}},"required":["awsAccountId","s3Bucket","integrationLabel","s3PrefixLogTypes","managedBucketNotifications","logProcessingRole","logStreamType"]},"S3SourceAPI.S3LogStreamTypeOptions":{"type":"object","properties":{"jsonArrayEnvelopeField":{"type":"string","description":"Path to the JSON array field to extract records from. Only applicable when logStreamType is JsonArray. Omit if the input is already a top-level array."},"retainEnvelopeFields":{"type":"boolean","description":"Preserve CloudWatch Logs envelope metadata (accountId, logGroup, subscriptionFilters) in a p_header column. Only applicable when logStreamType is CloudWatchLogs."},"xmlRootElement":{"type":"string","description":"Root element wrapping XML events. Only applicable when logStreamType is XML. Omit if events are not enclosed in a root element."}}},"S3SourceAPI.PrefixLogTypesMapping":{"type":"object","properties":{"excludedPrefixes":{"type":"array","items":{"type":"string"},"description":"Prefixes to exclude from matching. Use '*' as a wildcard for dynamic path segments."},"logTypes":{"type":"array","items":{"type":"string"},"description":"The log types (schemas) to apply for this prefix"},"prefix":{"type":"string","description":"S3 prefix to match. Leave empty to match all objects in the bucket."}}},"S3SourceAPI.S3Source":{"type":"object","properties":{"awsAccountId":{"type":"string","description":"The AWS account ID where the S3 bucket resides"},"integrationId":{"type":"string","description":"The unique ID of the S3 log source"},"integrationLabel":{"type":"string","description":"The integration label (name)"},"kmsKey":{"type":"string","description":"KMS key ARN for server-side encryption. Omit if the bucket is not KMS-encrypted."},"logProcessingRole":{"type":"string","description":"The IAM role ARN that Panther assumes to read from the S3 bucket"},"logStreamType":{"type":"string","description":"The log stream type. Supported: Auto, JSON, JsonArray, Lines, XML, CloudWatchLogs","enum":["Auto","JSON","JsonArray","Lines","XML","CloudWatchLogs"]},"logStreamTypeOptions":{"$ref":"#/components/schemas/S3SourceAPI.S3LogStreamTypeOptions"},"managedBucketNotifications":{"type":"boolean","description":"Whether Panther should configure the S3 bucket notifications automatically"},"s3Bucket":{"type":"string","description":"The S3 bucket name"},"s3PrefixLogTypes":{"type":"array","items":{"$ref":"#/components/schemas/S3SourceAPI.PrefixLogTypesMapping"},"description":"Prefix-based log type mappings for parsing ingested data"}}},"S3SourceAPI.BadRequestError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"S3SourceAPI.ExistsError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"S3SourceAPI.ServiceError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"paths":{"/log-sources/s3":{"post":{"tags":["s3 source"],"summary":"create s3 source","operationId":"s3 source#create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.CreateS3Source"}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.S3Source"}}}},"400":{"description":"bad_request: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.BadRequestError"}}}},"409":{"description":"exists: Conflict response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.ExistsError"}}}},"500":{"description":"service: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.ServiceError"}}}}}}}}}
```

## GET /log-sources/s3/{id}

> get s3 source

```json
{"openapi":"3.0.3","info":{"title":"Panther REST API","version":"1.0"},"tags":[{"name":"s3 source","description":"The S3 source API handles all operations for AWS S3 log sources"}],"servers":[{"url":"https://{api_host}","variables":{"api_host":{"default":"your-api-host"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"S3SourceAPI.S3Source":{"type":"object","properties":{"awsAccountId":{"type":"string","description":"The AWS account ID where the S3 bucket resides"},"integrationId":{"type":"string","description":"The unique ID of the S3 log source"},"integrationLabel":{"type":"string","description":"The integration label (name)"},"kmsKey":{"type":"string","description":"KMS key ARN for server-side encryption. Omit if the bucket is not KMS-encrypted."},"logProcessingRole":{"type":"string","description":"The IAM role ARN that Panther assumes to read from the S3 bucket"},"logStreamType":{"type":"string","description":"The log stream type. Supported: Auto, JSON, JsonArray, Lines, XML, CloudWatchLogs","enum":["Auto","JSON","JsonArray","Lines","XML","CloudWatchLogs"]},"logStreamTypeOptions":{"$ref":"#/components/schemas/S3SourceAPI.S3LogStreamTypeOptions"},"managedBucketNotifications":{"type":"boolean","description":"Whether Panther should configure the S3 bucket notifications automatically"},"s3Bucket":{"type":"string","description":"The S3 bucket name"},"s3PrefixLogTypes":{"type":"array","items":{"$ref":"#/components/schemas/S3SourceAPI.PrefixLogTypesMapping"},"description":"Prefix-based log type mappings for parsing ingested data"}}},"S3SourceAPI.S3LogStreamTypeOptions":{"type":"object","properties":{"jsonArrayEnvelopeField":{"type":"string","description":"Path to the JSON array field to extract records from. Only applicable when logStreamType is JsonArray. Omit if the input is already a top-level array."},"retainEnvelopeFields":{"type":"boolean","description":"Preserve CloudWatch Logs envelope metadata (accountId, logGroup, subscriptionFilters) in a p_header column. Only applicable when logStreamType is CloudWatchLogs."},"xmlRootElement":{"type":"string","description":"Root element wrapping XML events. Only applicable when logStreamType is XML. Omit if events are not enclosed in a root element."}}},"S3SourceAPI.PrefixLogTypesMapping":{"type":"object","properties":{"excludedPrefixes":{"type":"array","items":{"type":"string"},"description":"Prefixes to exclude from matching. Use '*' as a wildcard for dynamic path segments."},"logTypes":{"type":"array","items":{"type":"string"},"description":"The log types (schemas) to apply for this prefix"},"prefix":{"type":"string","description":"S3 prefix to match. Leave empty to match all objects in the bucket."}}},"S3SourceAPI.BadRequestError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"S3SourceAPI.NotFoundError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"S3SourceAPI.ServiceError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"paths":{"/log-sources/s3/{id}":{"get":{"tags":["s3 source"],"summary":"get s3 source","operationId":"s3 source#get","parameters":[{"name":"id","in":"path","description":"ID of the S3 source to fetch","required":true,"schema":{"type":"string","description":"ID of the S3 source to fetch"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.S3Source"}}}},"400":{"description":"bad_request: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.BadRequestError"}}}},"404":{"description":"not_found: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.NotFoundError"}}}},"500":{"description":"service: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.ServiceError"}}}}}}}}}
```

## PUT /log-sources/s3/{id}

> put s3 source

```json
{"openapi":"3.0.3","info":{"title":"Panther REST API","version":"1.0"},"tags":[{"name":"s3 source","description":"The S3 source API handles all operations for AWS S3 log sources"}],"servers":[{"url":"https://{api_host}","variables":{"api_host":{"default":"your-api-host"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"S3SourceAPI.ModifyS3Source":{"type":"object","properties":{"integrationLabel":{"type":"string","description":"The integration label (name)"},"kmsKey":{"type":"string","description":"KMS key ARN for server-side encryption. Omit if the bucket is not KMS-encrypted."},"logProcessingRole":{"type":"string","description":"The IAM role ARN that Panther assumes to read from the S3 bucket"},"logStreamType":{"type":"string","description":"The log stream type. Supported: Auto, JSON, JsonArray, Lines, XML, CloudWatchLogs","enum":["Auto","JSON","JsonArray","Lines","XML","CloudWatchLogs"]},"logStreamTypeOptions":{"$ref":"#/components/schemas/S3SourceAPI.S3LogStreamTypeOptions"},"managedBucketNotifications":{"type":"boolean","description":"Whether Panther should configure the S3 bucket notifications automatically"},"s3PrefixLogTypes":{"type":"array","items":{"$ref":"#/components/schemas/S3SourceAPI.PrefixLogTypesMapping"},"description":"Prefix-based log type mappings for parsing ingested data"}},"required":["integrationLabel","s3PrefixLogTypes","managedBucketNotifications","logProcessingRole","logStreamType"]},"S3SourceAPI.S3LogStreamTypeOptions":{"type":"object","properties":{"jsonArrayEnvelopeField":{"type":"string","description":"Path to the JSON array field to extract records from. Only applicable when logStreamType is JsonArray. Omit if the input is already a top-level array."},"retainEnvelopeFields":{"type":"boolean","description":"Preserve CloudWatch Logs envelope metadata (accountId, logGroup, subscriptionFilters) in a p_header column. Only applicable when logStreamType is CloudWatchLogs."},"xmlRootElement":{"type":"string","description":"Root element wrapping XML events. Only applicable when logStreamType is XML. Omit if events are not enclosed in a root element."}}},"S3SourceAPI.PrefixLogTypesMapping":{"type":"object","properties":{"excludedPrefixes":{"type":"array","items":{"type":"string"},"description":"Prefixes to exclude from matching. Use '*' as a wildcard for dynamic path segments."},"logTypes":{"type":"array","items":{"type":"string"},"description":"The log types (schemas) to apply for this prefix"},"prefix":{"type":"string","description":"S3 prefix to match. Leave empty to match all objects in the bucket."}}},"S3SourceAPI.S3Source":{"type":"object","properties":{"awsAccountId":{"type":"string","description":"The AWS account ID where the S3 bucket resides"},"integrationId":{"type":"string","description":"The unique ID of the S3 log source"},"integrationLabel":{"type":"string","description":"The integration label (name)"},"kmsKey":{"type":"string","description":"KMS key ARN for server-side encryption. Omit if the bucket is not KMS-encrypted."},"logProcessingRole":{"type":"string","description":"The IAM role ARN that Panther assumes to read from the S3 bucket"},"logStreamType":{"type":"string","description":"The log stream type. Supported: Auto, JSON, JsonArray, Lines, XML, CloudWatchLogs","enum":["Auto","JSON","JsonArray","Lines","XML","CloudWatchLogs"]},"logStreamTypeOptions":{"$ref":"#/components/schemas/S3SourceAPI.S3LogStreamTypeOptions"},"managedBucketNotifications":{"type":"boolean","description":"Whether Panther should configure the S3 bucket notifications automatically"},"s3Bucket":{"type":"string","description":"The S3 bucket name"},"s3PrefixLogTypes":{"type":"array","items":{"$ref":"#/components/schemas/S3SourceAPI.PrefixLogTypesMapping"},"description":"Prefix-based log type mappings for parsing ingested data"}}},"S3SourceAPI.BadRequestError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"S3SourceAPI.NotFoundError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"S3SourceAPI.ExistsError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"S3SourceAPI.ServiceError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"paths":{"/log-sources/s3/{id}":{"put":{"tags":["s3 source"],"summary":"put s3 source","operationId":"s3 source#put","parameters":[{"name":"id","in":"path","description":"ID of the S3 source to update","required":true,"schema":{"type":"string","description":"ID of the S3 source to update"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.ModifyS3Source"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.S3Source"}}}},"400":{"description":"bad_request: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.BadRequestError"}}}},"404":{"description":"not_found: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.NotFoundError"}}}},"409":{"description":"exists: Conflict response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.ExistsError"}}}},"500":{"description":"service: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.ServiceError"}}}}}}}}}
```

## DELETE /log-sources/s3/{id}

> delete s3 source

```json
{"openapi":"3.0.3","info":{"title":"Panther REST API","version":"1.0"},"tags":[{"name":"s3 source","description":"The S3 source API handles all operations for AWS S3 log sources"}],"servers":[{"url":"https://{api_host}","variables":{"api_host":{"default":"your-api-host"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"S3SourceAPI.BadRequestError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"S3SourceAPI.ServiceError":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"paths":{"/log-sources/s3/{id}":{"delete":{"tags":["s3 source"],"summary":"delete s3 source","operationId":"s3 source#delete","parameters":[{"name":"id","in":"path","description":"ID of the S3 source to delete","required":true,"schema":{"type":"string","description":"ID of the S3 source to delete"}}],"responses":{"204":{"description":"No Content response."},"400":{"description":"bad_request: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.BadRequestError"}}}},"500":{"description":"service: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SourceAPI.ServiceError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panther.com/ko/panther/api/rest/log-sources/s3-sources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
