---
title: "내 멤버십/정책 스냅샷 조회"
method: GET
path: "/v1/membership/me"
tags: ["Membership"]
---

# 내 멤버십/정책 스냅샷 조회

`GET /v1/membership/me`

## Request

- Base URL: `https://api.xdata.kr` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xdata.kr/v1/membership/me`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://api.xdata.kr/oauth/authorize`, token URL `https://api.xdata.kr/oauth/token`)

현재 인증 주체의 멤버십/정책 스냅샷 조회.

응답은 AuthPolicyService 평가 결과(PrincipalContext + quota/rate snapshot)를 그대로 노출한다.

## Query parameters

- `env_scope` 'production' | 'real_test' | 'sandbox', nullable: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.

## Headers

- `Authorization` string, nullable
- `X-Env-Scope` 'production' | 'real_test' | 'sandbox', nullable: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.

## Response `200`

현재 주체의 멤버십·정책 스냅샷.

- MembershipMeResponse: `GET /v1/membership/me` 의 200 응답. **Optional 을 넉넉히 둔 이유**: 이 응답은 주체에 따라 칸이 비는 것이 정상이다. 조직에 속하지 않은 주체는 `organization_id` 와 `organization_role` 이 없고, 운영 환경은 무제한이라 `quota_after` 가 없다(`AuthPolicyDecision.quota_after` 가 `Optional` 인 그 까닭). `rate_limit_after` 만 선언이 필수다 - 결정 객체에서도 필수 칸이다.
  - `success` boolean, required: 조회 성공 여부. 이 라우트는 성공 시 늘 true 다.
  - `policy_decision_id` string, required: 이 조회를 평가한 정책 결정의 식별자. 문의 시 이 값을 전달한다.
  - `principal_kind` 'client' | 'console_user' | 'admin_user' | 'legacy_api_key' | 'system', nullable: 인증 주체의 종류.
  - `organization_id` integer, nullable: 소속 조직 식별자. 조직 밖 주체는 없다.
  - `organization_role` 'OWNER' | 'ADMIN' | 'MEMBER', nullable: 그 조직에서의 역할.
  - `membership_tier` 'FREE' | 'PAID', nullable: 멤버십 등급.
  - `plan_name` string, nullable: 멤버십이 가리키는 요금제의 공개명(예: 라이트, 스탠다드, PRO). 멤버십이 없으면 없다. 주의: 가입 직후 데모 단계 계정도 공개명은 「라이트」 로 나온다 - 단계(데모 vs 정식)를 가르려면 이 이름이 아니라 membership_tier(FREE 또는 PAID)와 환경을 본다.
  - `subscription_status` 'ACTIVE' | 'PAUSED' | 'CANCELED' | 'EXPIRED', nullable: 구독 상태.
  - `quota_after` MembershipQuotaAfterModel: 이 요청을 센 뒤의 쿼터. `QuotaSnapshot.to_dict(include_key=False)` 의 거울이다. `key` 칸은 **일부러 없다**(모듈 머리말). 테스트 환경에서만 의미가 있어 상위 칸이 선택이다.
    - `limit` integer, required: 그 주기에 허용된 사용 토큰 수.
    - `used` integer, required: 그 주기에 누적된 사용 토큰 수.
    - `remaining` integer, required: 남은 사용 토큰 수.
    - `reset_at` string, required: 주기가 초기화되는 시각(ISO 8601, KST).
    - `period` 'day' | 'month', required: 이 수치가 세는 주기.
  - `quota_month_after` MembershipQuotaAfterModel: 이 요청을 센 뒤의 쿼터. `QuotaSnapshot.to_dict(include_key=False)` 의 거울이다. `key` 칸은 **일부러 없다**(모듈 머리말). 테스트 환경에서만 의미가 있어 상위 칸이 선택이다.
    - `limit` integer, required: 그 주기에 허용된 사용 토큰 수.
    - `used` integer, required: 그 주기에 누적된 사용 토큰 수.
    - `remaining` integer, required: 남은 사용 토큰 수.
    - `reset_at` string, required: 주기가 초기화되는 시각(ISO 8601, KST).
    - `period` 'day' | 'month', required: 이 수치가 세는 주기.
  - `demo_ends_at` string, nullable: 데모 환경이 닫히는 시각(ISO 8601, KST). 기한이 없거나 데모 승인 전이면 없다.
  - `rate_limit_after` MembershipRateLimitAfterModel, required: 이 요청을 센 뒤의 레이트리밋. `RateLimitSnapshot` 의 거울이다.
    - `window_seconds` integer, required: 평가 윈도우 길이(초).
    - `limit` integer, required: 윈도우당 허용 횟수.
    - `used` integer, required: 현 윈도우 누적 횟수.
    - `remaining` integer, required: 남은 횟수.
    - `reset_at` string, required: 윈도우가 초기화되는 시각(ISO 8601).

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xdata/apis/xboss-api.md) · [All operations](https://skmtc.dev/xdata/apis/xboss-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xdata/apis/xboss-api/revisions/816de78950db?raw)
