# 토큰 회전

## 개요

다음을 호출하여 Panther API 토큰을 교체할 수 있습니다 `rotateAPIToken` GraphQL API 엔드포인트.

콘솔의 API 플레이그라운드 또는 GraphQL-over-HTTP API를 사용하여 Panther의 API를 호출할 수 있습니다. 이러한 방법에 대한 자세한 내용은 [Panther API](https://docs.panther.com/ko/panther/api/..#step-1-choose-a-method-for-invoking-the-api).

#### API 토큰 교체

Panther API 토큰을 교체하려면:

1. 아래 작업을 수행하여 토큰을 교체하십시오.
   * ```graphql
     mutation rotateAPIToken() {
       rotateAPIToken() {
         token{ value }
       }
     }
     ```
   * 요청 헤더에 교체하려는 API 토큰을 사용하세요.
   * 응답 페이로드에 갱신된 API 토큰이 표시됩니다.
2. 갱신된 토큰을 복사하세요—한 번만 표시됩니다.

#### API 플레이그라운드 예시

Panther 콘솔의 API 플레이그라운드에서 수행한 `rotateAPIToken` 는 다음과 같습니다:

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-a7c0b9b35fd122d7b2567fdcd7974b1e3c040c20%2FScreenshot%202023-03-21%20at%2011.04.19%20AM.png?alt=media" alt="The API Playground page in the Console shows a rotateAPIToken call and response. There is a section at the bottom for Request Headers, and on the right a Documentation Explorer."><figcaption></figcaption></figure>
