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

# API 놀이터

## 개요

Panther Console의 API Playground에서 GraphQL API와 REST API의 작업을 시험해 볼 수 있습니다.

### Playground에 액세스하는 방법

{% hint style="info" %}
다음을 가지고 있어야 합니다 `API 토큰 보기` Playground에 액세스할 권한이 있어야 합니다—참조 [Panther의 역할 기반 접근 제어](/ko/system-configuration/rbac.md) 문서에서 사용자 역할 수정 방법을 확인하세요.
{% endhint %}

1. Panther Console의 오른쪽 상단 모서리에서 기어 아이콘을 클릭하여 설정을 엽니다.
2. 다음으로 이동: **개발자 도구** > **API 플레이그라운드**.
3. 창 상단의 탭을 사용하여 테스트할 API 세트를 선택합니다: [GraphQL](/ko/panther/api/graphql.md) 또는 [REST](/ko/panther/api/rest.md).
   * 다음에 API Playground를 방문하면 마지막으로 사용하던 API로 이동합니다.\\

     <figure><img src="/files/9070d675872b5f7654f7247ef97990e234c72966" alt="Two tabs are shown: GraphQL and REST." width="204"><figcaption></figcaption></figure>

{% hint style="warning" %}
참고:

* API 토큰을 방금 생성했다면, 새 토큰이 관련 분산 AWS 서비스에서 사용 가능해질 때까지 30\~60초 기다려 주세요.
* 보안상의 이유로 API 토큰은 **이 아니라** 페이지를 새로 고치거나 다른 페이지로 이동해도 Playground에 유지됩니다. Playground를 사용할 때마다 API 토큰을 다시 입력해야 합니다.
  {% endhint %}

## GraphQL Playground

유효한 API 토큰을 입력한 후, 왼쪽 상단의 "재생" 아이콘을 클릭하여 GraphQL 쿼리를 강제로 실행합니다.

<figure><img src="/files/4887e3494e6335b3e71ce7796194872ddfbf68fd" alt="The API Playground&#x27;s default view shows an example query in a code editor on the left. On the right, there is a column labeled Documentation Explorer."><figcaption></figcaption></figure>

### 문서 탐색기

Panther Console의 Documentation Explorer는 Panther API 스키마를 살펴보는 한 가지 방법입니다. 다운로드 가능한 스키마 파일을 포함한 다른 방법을 알아보려면 다음을 참조하세요: [Panther GraphQL 스키마 알아보기](/ko/panther/api/graphql.md#discover-the-panther-graphql-schema).

다음을 참조하세요 **문서 탐색기** Playground 오른쪽에 있습니다. 사용 가능한 쿼리와 변형을 각 필드와 엔티티의 설명 및 유형과 함께 표시합니다:

<figure><img src="/files/ba8ebc1267e58b1c4fa7c9d34440204c1b1cd799" alt="The image shows the Documentation Explorer that appears on the right side of the API Playground. It has a search field at the top, and a header labeled &#x22;Root Types.&#x22; Under &#x22;Root Types,&#x22; it lists &#x22;query: Query&#x22; and &#x22;mutation: Mutation&#x22;." width="375"><figcaption></figcaption></figure>

### 직접 쿼리 작성하기

자동 완성 기능과 Documentation Explorer는 직접 쿼리를 작성하는 데 도움을 줍니다. 또한 페이지 상단 근처에 세 가지 유틸리티 버튼이 있습니다:

* **서식 지정** GraphQL 표준에 맞게 쿼리를 서식 지정하는 데 도움을 줍니다
* **복사** 요청을 보낼 클라이언트에 붙여넣기 위해 쿼리를 복사합니다
* **curl 복사** curl 명령줄 도구가 설치된 모든 UNIX 시스템에 붙여넣을 수 있는 완전한 curl 명령을 복사합니다.

Panther 웹 애플리케이션에서 복사될 curl 명령의 예:

```
curl 'PANTHER_GRAPHQL_API_URL' \\
-H 'Accept-Encoding: gzip, deflate, br' \\
-H 'Content-Type: application/json' \\
-H 'Accept: application/json' \\
-H 'Connection: keep-alive' \\
-H 'DNT: 1' \\
-H 'Origin: http://{PANTHER_GRAPHQL_API_URL}/public/graphql' \\
-H 'X-API-Key: {FAKE_API_KEY_WITH_USER_READ_PERMISSIONS}' \\
--data-binary '{\"query\":\"\n # 조직의 사용자 목록을 나열하는 예시 쿼리\n query Users {\n\t\t\tgivenName\n familyName\n email\n }\n }\",\"variables\":{}}' \\
--compressed
```

## REST Playground

REST Playground를 사용하여 Panther를 살펴보고 시험해 보세요 [REST API](/ko/panther/api/rest.md).

### API 토큰 설정 방법

1. 오른쪽 상단에서 다음을 클릭합니다: **승인**.\\

   <figure><img src="/files/0218640fca90849611226200f4a862cc8e7349d1" alt="An arrow is drawn to a button labeled &#x22;Authorize.&#x22;"><figcaption></figcaption></figure>
2. 모달에 API 키를 입력합니다.
3. 다음을 클릭합니다: **승인**, 그런 다음 **닫기**.

### API 그룹 살펴보기

API 그룹은 먼저 나열되며, 각 API의 URL 경로별로 묶여 있습니다. 특정 엔드포인트의 요청 인수와 예시 반환 페이로드를 포함한 추가 세부 정보를 보려면 엔드포인트 행의 오른쪽에 있는 화살표를 클릭하세요.

<figure><img src="/files/6b1a794bd8905e7d65ae59ba9fb989b79350adaa" alt="Under a header reading &#x22;Panther REST API,&#x22; a grouping of data model endpoints is shown. There are GET (list), POST, DELETE, GET, and PUT endpoints."><figcaption></figcaption></figure>

#### 요청 보내기

{% hint style="info" %}
요청을 성공적으로 보내려면 Playground에 API 토큰을 이미 추가해야 합니다. 참조하세요 [API 토큰 설정 방법](#how-to-set-your-api-token), 위에서.
{% endhint %}

Playground에서 요청을 보내려면:

1. 확장된 API 엔드포인트 안에서 클릭하세요 **시도해 보기**.
2. 다음의 **매개변수** 섹션에서 필요에 따라 필수 및 선택적 매개변수의 값을 입력합니다.
3. 다음을 클릭합니다: **실행**.

<figure><img src="/files/c83aa1811cdfc831507050068c1561929594d470" alt="Within a GET /rules section, a &#x22;Try it out&#x22; button is circled. Two parameters are shown: cursor, and limit."><figcaption></figcaption></figure>

### 스키마 보기

API 그룹 아래에 각 데이터 유형의 스키마가 나열됩니다:

<figure><img src="/files/a7841fbc742d330f0b007acc5d7641af6990387c" alt="The Schema section showing all the data types grouped by name"><figcaption></figcaption></figure>

특정 데이터 유형의 세부 정보를 보려면 해당 행을 클릭하여 펼치세요:

<figure><img src="/files/8e75b4bca3fca9a191484978a07c39af33b07624" alt="A &#x22;RuleAPI.Rule&#x22; entity is shown. Part of the JSON body is expanded, while other parts are closed."><figcaption></figcaption></figure>

이러한 스키마는 다음을 볼 때도 표시됩니다 [API 그룹을 보는 중](#exploring-api-groups). 다음에서 **응답** 섹션에서 다음 옆에 **예시 값**, 다음을 클릭하세요 **스키마**.

<figure><img src="/files/69a4fbd1eb896babaff231f7570e5f1d4b0db4ef" alt="Inline schema block in the Responses portion of an API Group, showing the datatype where it is used."><figcaption></figcaption></figure>


---

# 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/api-playground.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.
