> 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 호출을 하기 전에, [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">Users</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 콘솔의 오른쪽 상단에서 톱니바퀴 아이콘을 클릭하여 설정을 연 다음 **개발자 도구** > **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) 엔터티의 페이지에서 각 작업에 필요한 권한을 확인할 수 있습니다. 자세한 내용은 [Console 및 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 주소를 하나 이상 입력하세요. 필요 없으면 비워 두셔도 됩니다.
   * CIDR 표기법으로 IP 주소를 입력하세요. 예: `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 토큰 생성 성공 화면에서 **플레이그라운드에서 한번 실행해 보세요**.
2. Playground 화면의 왼쪽 아래 모서리에서 **요청 헤더** 탭을 찾으세요. 이 탭에서 `X-API-Key` 헤더를 `<ENTER_YOUR_KEY_HERE>` 에서 API 토큰 값으로 기본값을 변경하세요.
3. 왼쪽 위 모서리에서 "play" 아이콘을 눌러 테스트를 실행하세요.

<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 콘솔의 오른쪽 상단에서 톱니바퀴 아이콘을 클릭하여 설정을 연 다음 **개발자 도구** > **API 토큰**.
2. 순환할 토큰을 찾으세요. 해당 타일의 오른쪽 위 모서리에서 점 3개 아이콘을 클릭한 다음 **순환**.

   <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:

```
GET https://docs.panther.com/ko/panther/api.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.
