> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/ko/panther/api.md).

# Panther API

## 개요

Panther는 하나의 [REST API](/ko/panther/api/rest.md) 그리고 하나의 [GraphQL-over-HTTP API](/ko/panther/api/graphql.md). 다음을 사용할 수 있습니다 [API 플레이그라운드](/ko/panther/api/api-playground.md) Panther Console에서 두 API를 모두 탐색하려면 [API 토큰을 생성하세요](#how-to-create-a-panther-api-token).

다음을 확인하세요 [REST API 스키마는 여기에서](/ko/panther/api/rest.md#discover-the-panther-rest-api-schema), 그리고 [GraphQL 스키마는 여기에서](/ko/panther/api/graphql.md#discover-the-panther-graphql-schema).

### 지원되는 작업

Panther API는 보안 워크플로를 구축할 수 있도록 계속 확장되는 작업 집합을 지원합니다:

| <p><a href="/pages/190c139b49e54271b832cb151f3436cc65bf00dc">REST API</a></p><ul><li><a href="/pages/eac02575dde3bdcdc4f7aad128ae8ebe2b07984b">알러트</a></li><li><a href="/pages/3184d4c9a94bbc004040df496568fff73d215539">알러트 댓글</a></li><li><a href="/pages/d196290f5da605415597501eb7c8649d5638f602">API 토큰</a></li><li><a href="/pages/31068d75b7c605506a32b20d1c127518311e43fc">클라우드 계정</a></li><li><a href="/pages/77015945072824cb7bcab68a8c2d87c137a226c3">데이터 모델</a></li><li><a href="/pages/7d133d238307c7cd23bc28c3024545d0f5e7e64c">전역 항목</a></li><li><a href="/pages/eba1a16e59baf5514a45f0e7603076d4d15a57f7">로그 소스</a></li><li><a href="/pages/d1fa74b6597a7130ea3b0b38dee4cb3e34624b9c">쿼리</a></li><li><a href="/pages/d7a63c26cb87930d882db76391dd1cf6ac669fb8">역할</a></li><li><a href="/pages/387fc4b40a02105b587a1d99412704ac717959df">룰</a></li><li><a href="/pages/4d24cd09421da3a63622578bd25e569a85895319">스케줄 규칙</a></li><li><a href="/pages/1ff7dac64583794e258e78113a270c9aee041ad9">단순 규칙</a></li><li><a href="/pages/c7c6782fe88262aea7e254cb518c4df080b312b4">정책</a></li><li><a href="/pages/2684388e02d4369b7f9f817f4635180f1865d43b">사용자</a></li></ul> | <p><a href="/pages/1ead32d7147fdf0b5145f03ce2a585ec71597052">GraphQL API</a></p><ul><li><a href="/pages/1ce1941f48cf9fa5271c3d789f099b647ae06956">알림 및 오류</a></li><li><a href="/pages/2623c01998c576e208071205b497a5f1a60aa952">클라우드 계정 관리</a></li><li><a href="/pages/f06dcfe0174773dbfcf84cae9c2104589c061bc6">데이터 레이크 쿼리</a></li><li><a href="/pages/40b4e0f73e59ed8f3d28714e6f91b705971106ae">로그 소스 관리</a></li><li><a href="/pages/7a8e320ca6b3cf93e59e00d66c0df822826b169d">메트릭</a></li><li><a href="/pages/398053b91812a7ccc6170097e0cf7729005a9535">토큰 회전</a></li><li><a href="/pages/dfd7df422eb1b0a2a687ba3dec1125becf2572b5">사용자 및 역할 관리</a></li></ul> |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

## Panther API 토큰을 만드는 방법

{% hint style="info" %}
API 토큰을 성공적으로 생성한 후에는 정기적으로 회전하는 것을 잊지 마세요. 토큰 회전에 대한 지침은 다음에서 확인하세요. [API 토큰 회전하기](#rotating-api-tokens), 아래.
{% endhint %}

1. Panther Console의 왼쪽 탐색 모음 하단에서 **설정**를 클릭한 다음 **개발자 도구** > **API 토큰**.
2. 클릭합니다 **API 토큰 생성**.\
   ![The image shows the API Tokens page in the Panther Console. The screen says "You haven't created any tokens yet" and there is a red circle around the "Create an API Token" button at the bottom.](/files/85af168f5f28902b0b187cccf092b9b2d407ff21)
   * 이미 토큰이 존재하는 경우 **새 토큰 생성**.
3. 다음을 제공하세요 **이름**을 클릭한 다음 이 토큰에 부여할 권한을 선택하세요.
   * 각 [REST API](/ko/panther/api/rest.md) 작업에 필요한 권한은 각 엔터티 페이지에서 확인할 수 있습니다. 다음을 참조하세요. [콘솔 및 API의 권한 이름](/ko/system-configuration/rbac.md#permission-names-in-the-console-and-api) 에서 추가 정보를 확인하세요.
   * 다음을 참조하세요 [여기에서 각 Panther Analysis Tool(PAT) 명령에 필요한 권한](/ko/panther/detections-repo/pat/pat-commands.md#permissions-required-per-command).
4. 다음 **IP 제한** 섹션, **CIDR 블록** 필드에 토큰 사용을 제한할 IP 주소를 하나 이상 입력하세요(해당하는 경우).
   * IP 주소를 CIDR 표기법으로 입력하세요. 예: `10.0.0.0/8` 또는 `8.8.8.8/32`.
   * 지정된 IP 주소가 없으면 토큰은 모든 IP 주소에서 사용할 수 있습니다.
5. 클릭합니다 **API 토큰 생성**.
   * 성공 화면이 표시되며, 여기에는 API 토큰 값이 나타납니다. API 토큰을 복사해 안전한 위치에 보관하세요. 다시는 표시되지 않습니다.
   * 선택 사항으로 [새 API 토큰이 작동하는지 확인하세요](#validating-your-api-token).

<figure><img src="/files/10d7f85dd14f3759a1d79d54e68e19114c4935d1" alt="The image shows the success screen after you create an API Key. At the top, it says &#x22;API Key Created&#x22;. There is a drawing of two people holding up a green checkmark. The API Key in this screen shot is blurred out. Beneath the key there is a blue button labeled &#x22;Done.&#x22;" width="375"><figcaption></figcaption></figure>

### API 토큰 검증

{% hint style="info" %}
API 토큰을 추가한 후 30초에서 60초 정도 전파 지연이 있을 수 있습니다.
{% endhint %}

API 토큰을 생성한 후에는 API Playground 또는 PAT를 사용하여 제대로 작동하는지 확인할 수 있습니다:

{% tabs %}
{% tab title="API 플레이그라운드" %}
Panther Console의 API Playground에서 API 토큰을 테스트하려면:

1. API 토큰 생성 성공 화면에서 **Playground에서 한번 시도해 보세요**.
2. Playground 화면의 왼쪽 아래에서 **요청 헤더** 탭을 찾으세요. 이 탭에서 기본값을 `X-API-Key` 헤더의 값을 다음에서 `<ENTER_YOUR_KEY_HERE>` API 토큰 값으로 변경하세요.
3. 왼쪽 위에서 "재생" 아이콘을 눌러 테스트를 실행하세요.

<figure><img src="/files/8a7c136e9a7cbbec28fb27e19abb27981cc2ac20" alt="The image shows the API Playground from the Panther Console. At the top, a play icon button is circled. On the left, a code box contains an example query. Beneath that, the header &#x22;Request Header&#x22; is circled. On the right, there is a section labeled &#x22;Documentation Explorer&#x22;." width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="PAT" %}
{% hint style="warning" %}
반드시 [PAT가 설치되어 있어야 합니다](/ko/panther/detections-repo/pat/install-configure-and-authenticate-with-pat.md) 이 테스트를 수행하려면
{% endhint %}

다음을 사용하여 API 토큰을 테스트하려면 [PAT](/ko/panther/detections-repo/pat.md) CLI에서:

* 실행하세요 `pipenv run pat check-connection --api-token <your-api-token> --api-host <your-api-host>`.
  {% endtab %}
  {% endtabs %}

### API 토큰 회전하기

API 토큰은 Panther의 공개 API에 대해 인증하고 접근 권한을 부여하는 데 사용됩니다. 사용자 이름 및 비밀번호 자격 증명과 마찬가지로, 악의적인 행위자로부터 보호하기 위해 API 토큰을 안전하게 저장해야 합니다. 토큰을 정기적으로 회전하면 침해될 가능성을 줄일 수 있습니다. Center for Internet Security(CIS)와 National Institute of Standards and Technology(NIST)는 90일마다 API 토큰을 회전할 것을 권장합니다.

Panther Console에서 또는 Panther의 API 자체를 호출하여 API 토큰을 회전할 수 있습니다. 토큰을 회전하면 이전 토큰은 더 이상 유효하지 않습니다.

{% tabs %}
{% tab title="Panther Console" %}
**Panther Console에서 API 토큰 회전**

Panther Console에서 API 토큰을 회전하려면:

1. Panther Console의 왼쪽 탐색 모음 하단에서 **설정**를 클릭한 다음 **개발자 도구** > **API 토큰**.
2. 회전하려는 토큰을 찾습니다. 해당 타일의 오른쪽 위 모서리에서 세 개의 점 아이콘을 클릭한 다음 **회전**.

   <figure><img src="/files/c16cc927d5c61e2b558740401650b4dba95b4309" alt="The API Tokens page in the Console shows a token called &#x22;Example Key.&#x22; It has info about who created and modified the token, as well as when it expires. The three dot menu is open, and three options are displayed: Edit, Rotate, and Delete."><figcaption></figcaption></figure>
3. 표시되는 확인 모달에서 **계속**.\
   ![A modal titled "Rotate Example Key" asks the user if they're sure they want to refresh the key. There are Cancel and Continue buttons.](/files/67580f6bc0ac3ce5f7355031c932201c747ee4ac)
4. 모달에 새 API 토큰이 표시됩니다. 이 값은 한 번만 볼 수 있으므로 반드시 복사해 안전한 위치에 저장하세요.\
   ![The key rotation modal displays the new API token. There is a note saying "Please copy it since we won't show it to you again."](/files/68743aa868f28ffe9dbd8fcd1a6a7a98d5d31203)
   {% endtab %}

{% tab title="REST API" %}
**Panther REST API를 사용하여 API 토큰 회전**

Panther REST API를 사용하여 API 토큰을 회전할 수 있습니다. API 토큰은 다음을 사용해 자체적으로 회전합니다. `POST api-tokens/self/rotate` 엔드포인트. 자세한 내용은 [API 토큰](/ko/panther/api/rest/api-tokens.md).
{% endtab %}

{% tab title="GraphQL API" %}
**Panther GraphQL API를 사용하여 API 토큰 회전**

Panther GraphQL API를 사용하여 API 토큰을 회전할 수 있으며, `rotateAPIToken` 작업을 사용합니다. 이 엔드포인트 사용 방법에 대한 자세한 내용은 [토큰 회전](/ko/panther/api/graphql/token-rotation.md).
{% endtab %}
{% endtabs %}

## Panther API 문제 해결

Panther Knowledge Base를 방문하여 [Panther API 관련 문서를 확인하세요](https://help.panther.com/Panther_Developer_Workflows/Panther_API) 자주 묻는 질문에 대한 답변과 일반적인 오류 및 문제 해결 방법을 살펴보세요.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.panther.com/ko/panther/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
