> 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/rest.md).

# REST API

## 개요

Panther는 Panther 인스턴스의 일부와 상호작용할 수 있는 REST API를 제공합니다. 현재 REST API를 통해 다음 엔터티와 상호작용할 수 있습니다:

* [알러트](/ko/panther/api/rest/alerts.md)
* [알러트 댓글](/ko/panther/api/rest/alert-comments.md)
* [알러트 컨텍스트 태그](/ko/panther/api/rest/alert-context-tags.md)
* [API 토큰](/ko/panther/api/rest/api-tokens.md)
* [클라우드 계정](/ko/panther/api/rest/cloud-accounts.md)
* [상관 규칙](/ko/panther/api/rest/correlation-rules.md)
* [데이터 모델](/ko/panther/api/rest/data-models.md)
* [전역 항목](/ko/panther/api/rest/globals.md)
* [로그 소스](/ko/panther/api/rest/log-sources.md)
* [로그 소스 알람](/ko/panther/api/rest/log-source-alarms.md)
* [쿼리](/ko/panther/api/rest/queries.md)
* [역할](/ko/panther/api/rest/roles.md)
* [룰](/ko/panther/api/rest/rules.md)
* [예약된 규칙](/ko/panther/api/rest/scheduled-rules.md)
* [Simple/YAML 규칙](/ko/panther/api/rest/simple-rules.md)
* [정책](/ko/panther/api/rest/policies.md)
* [사용자](/ko/panther/api/rest/users.md)

추가 작업은 다음에서 사용할 수 있습니다 [GraphQL API](/ko/panther/api/graphql.md).

### Panther REST API 스키마를 확인해 보세요

{% tabs %}
{% tab title="OpenAPI 사양" %}
다음 OpenAPI 사양 파일을 다운로드하여 REST API 스키마를 확인할 수 있습니다:

[**다운로드 `panther-labs-api.yaml`**](https://openapi.gitbook.com/o/-LgddDaIOc7MA4mxoaPa/spec/panther-labs-api.yaml)
{% endtab %}

{% tab title="API 플레이그라운드 " %}
Panther Console의 API Playground를 탐색하여 API 스키마를 확인할 수 있습니다. 자세한 내용은 다음을 참조하세요. [API 플레이그라운드](/ko/panther/api/api-playground.md).
{% endtab %}
{% endtabs %}

## Panther REST API 사용 방법

### 1단계: Panther REST API URL 식별

REST API URL을 찾으려면:

* Panther Console의 왼쪽 탐색 모음 하단에서 **설정**를 클릭한 다음 **개발자 도구** > **API 토큰**. 페이지 상단에서 다음을 확인하세요 **API URL**.

  * Panther를 실행 중인 [SaaS](/ko/system-configuration/panther-deployment-types.md#saas) 배포의 REST URL은 아래에 표시된 부분이 됩니다:

  <figure><img src="/files/5c967cd85a35ac284feabf865e257511e23e3399" alt="An &#x22;API Tokens&#x22; section shows a blurred-out API URL"><figcaption></figcaption></figure>

  * Panther를 실행 중인 [Cloud Connected](/ko/system-configuration/panther-deployment-types.md#cloud-connected) 또는 [자체 호스팅](/ko/system-configuration/panther-deployment-types.md#self-hosted-legacy) Panther 배포의 URL은 아래에 표시된 부분(다음을 포함)입니다: `/v1`):

  <figure><img src="/files/41fdc70394b9ef66c36db901112463b7bb4af499" alt="An &#x22;API Tokens&#x22; section shows a blurred-out API URL"><figcaption></figcaption></figure>

{% hint style="warning" %}
모든 REST URL에는 `/public/graphql` 가 끝부분에 포함되지 않는다는 점에 유의하세요.
{% endhint %}

### 2단계: API 토큰 생성

* 참고 [API 토큰 생성 방법에 대한 이 지침](/ko/panther/api.md#how-to-create-a-panther-api-token). 각 엔터티 페이지(이 페이지 아래에 중첩됨)에서 각 REST API 작업에 필요한 권한을 찾을 수 있습니다. 다음을 참조하세요. [콘솔 및 API의 권한 이름](/ko/system-configuration/rbac.md#permission-names-in-the-console-and-api) 에서 추가 정보를 확인하세요.

### 3단계: Panther REST API 호출

다음을 사용한 테스트 외에도 [API 플레이그라운드](/ko/panther/api/api-playground.md) 콘솔에서 Swagger, Postman 또는 이 문서를 사용하여 REST API를 호출할 수 있습니다:

{% tabs %}
{% tab title="Swagger" %}
**Swagger를 사용하여 REST API에 액세스하기**

1. 웹 브라우저에서 다음으로 이동하세요. [Swagger Editor](https://editor.swagger.io/).
2. 왼쪽 코드 편집기에 위에서 찾은 Panther REST OpenAPI 사양 파일을 붙여넣습니다. 위치는 [Panther REST API 스키마를 확인해 보세요](#discover-the-panther-rest-api-schema).
3. 오른쪽에서, 아래의 **서버 변수**에서 사용할 예제 SQL 쿼리를 참조하세요. **api\_host**, 프로토콜을 제외한 Panther REST API URL을 입력합니다(즉, 다음을 제외하고 `https://`).\
   ![A "Server variables" section shows an api\_host](/files/1e233cfca656775365e6e684608aaad2e3601a5a)
4. 클릭합니다 **권한 부여**.\
   ![An Authorize button](/files/42021aece63812b3985233b0bfcd593be30e065f)
5. 다음 **사용 가능한 인증** 모달:
   1. 아래 **값**, API 토큰 값을 입력합니다.
   2. 클릭합니다 **권한 부여**.
   3. 클릭합니다 **닫기**.\
      ![An "Available authorizations" section shows "ApiKeyAuth" section, with a "Value" field. There are "Authorize" and "Close" buttons.](/files/f189a8b13fec4fd110ee151aa4c5b85ef313d0a3)
6. 이제 API 호출을 시도할 수 있습니다:
   1. 엔드포인트를 선택한 다음, 아래쪽 화살표를 클릭하여 확장합니다.
   2. 클릭합니다 **직접 사용해 보기**.\
      ![A  "GET /globals" section has a "Try it out" button](/files/3739e61b50eb2b3eedd73dfa0981d3864a644eed)
   3. 클릭합니다 **실행**.
      {% endtab %}

{% tab title="Postman" %}
**Postman을 사용하여 REST API에 액세스하기**

Panther Postman 컬렉션을 가져와 URL 및 API 변수로 새 환경을 만든 다음 요청을 시도합니다.

1. 다음을 다운로드하세요 `Panther_REST_API_postman_collection.json` 이 탭 하단의 파일.
2. Postman 애플리케이션에서 **파일** > **가져오기**.
3. 다음을 선택합니다 `Panther_REST_API_postman_collection.json` 파일을 클릭합니다.
   * 아래 **컬렉션**, 이제 **Panther Rest API** 컬렉션이 있습니다.
4. 클릭합니다 **환경**, 그런 다음 더하기 기호(**+**).\
   ![A "My Workspace" section has a plus button with the tooltip "Create new environment"](/files/e4d965e65b6c4c887515d9adcf12a34b6be729ca)
5. 환경 이름을 입력하세요—예: "Panther."
6. 오른쪽 표에 다음 두 변수를 입력하세요:
   * `restHost`: **현재 값**, 전체 Panther REST API URL을 입력합니다.
     * 이 값은 다음의 지침을 따르면 찾을 수 있습니다 [1단계: Panther REST API URL 식별](#step-1-identify-your-panther-rest-api-url).
   * `restApiToken`: **현재 값**, Panther API 토큰을 입력합니다.  **유형** 열에서 선택합니다 **secret**.

     <figure><img src="/files/b43c8b0c22d93c411460b8aadfefa692384dba8d" alt="A table is shown with two rows filled in: one for restHost and one for restApiToken. There is a Type and Current value for each."><figcaption></figcaption></figure>
7. 오른쪽 상단에서 다음을 클릭하세요: **저장**.
8. 이제 요청을 시도할 수 있습니다:
   1. 오른쪽 위 모서리에서 환경 드롭다운을 클릭하고 이전 단계에서 만든 환경을 선택합니다.\ <img src="/files/583e90b0778642264c19bb57a188c20966b94154" alt="A drop-down field shows two options: &#x22;No Environment&#x22; and &#x22;Panther&#x22;" data-size="original">
   2. 클릭합니다 **컬렉션**.
   3. 다음을 확장합니다 **Panther Rest API** 컬렉션을 선택한 다음 요청을 선택합니다.
   4. 클릭합니다 **보내기**.

{% file src="/files/b956fef919733fc37f443b9560806b41d872acc2" %}
{% endtab %}

{% tab title="이 문서" %}
**Panther 문서를 사용하여 REST API에 액세스하기**

1. 이 페이지 아래에 중첩된 REST API 엔터티 페이지 중 하나로 이동하여 수행하려는 작업을 찾습니다.
2. 작업의 오른쪽 하단 모서리에서 **요청** 타일을 클릭하세요: **▶ 테스트해 보기**.

   <figure><img src="/files/cefb8e3ae6d6a29a2c07194dc2c8f863d62503b4" alt="A &#x22;Get an alert&#x22; section includes cards for &#x22;Path parameters,&#x22; &#x22;Responses,&#x22; and &#x22;Authorizations.&#x22; The &#x22;Test it&#x22; button is circled."><figcaption></figcaption></figure>
3. 표시되는 엔드포인트 상단의 모달에서 `{api_host}`.\
   ![In a URL value, the {api\_host} section is circled.](/files/c57238e33ccf3d9d169628d3fc9ffab4b89ffd0e)
4. 다음 **api\_host** 필드에 REST API URL을 입력합니다. 3단계에서 식별한 값으로, [1단계](#step-1-identify-your-panther-rest-api-url), 프로토콜을 제외한 (즉, 다음을 제외하고 `https://`).\
   ![There is a circle around "api\_host: my-REST-API-URL."](/files/630356de5a6d4478bc3aedf2a428fe1b1786b547)
5. 다음 **인증** 섹션에서 **인증 유형** 드롭다운을 클릭합니다.
   1. 아래 **필수 인증**, 다음 옆의 상자를 선택합니다 **ApiKeyAuth**.\
      ![Under an "Authentication" header, an arrow is drawn from an "ApiKeyAuth" button to a value labeled "ApiKeyAuth."](/files/569bb87ba6b5f125d3ea46466000452e27c3af45)
   2. 아래 **인증**, **이름** 및 **값** 필드가 채워집니다.  **값**에 API 토큰을 입력합니다. [2단계](#step-2-generate-an-api-token).
6. 다음 **변수** 섹션에서 작업에 필요한 경로 변수가 있으면, 예를 들어 `{id}`, 다음의 값(들)을 제공합니다. `값` 열.\
   ![Under a "Get an alert" title, there are sub-sections titled Authentication, Variables, and Cookies. The value of "id" within Variables is circled.](/files/9ea532a507eea949e2ee37962897779edbac6c68)
7. 값이 **쿼리 매개변수** 섹션에 있으면, 이 호출에 적용하려면 오른쪽 열의 확인란을 클릭합니다.\
   ![A "Query Parameters" header is over a table with columns for "KEY," "VALUE," and a three-lines icon. There are two rows filled in, and the third column is circled.](/files/b6c78c6a12c613c13c4a04889a751cee9722fe9d)
8. 요청 본문이 요청에 필요하면, 다음 안에 내용을 추가하세요 **본문**.
9. 클릭합니다 **요청 보내기**.
   {% endtab %}
   {% endtabs %}


---

# 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/rest.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.
