> 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 토큰을 입력한 뒤, 왼쪽 상단의 "play" 아이콘을 클릭하여 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의 문서 탐색기는 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>

### 직접 쿼리 작성하기

자동 완성 기능과 문서 탐색기는 직접 쿼리를 작성하는 데 도움이 됩니다. 또한 페이지 상단 근처에는 세 개의 유틸리티 버튼이 있습니다:

* **예쁘게 정리** 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 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, and the optional `goal` query parameter:

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