본문 바로가기
WIKI 기술 지식 베이스

Get Tenants API

원문 보기 위키 갱신

출처: 문서

본문

테넌트 조회 API

1.0부터 도입 {: .label .label-purple }

테넌트를 조회해요. 테넌트 이름을 지정하면 해당 테넌트 하나를 조회하고, 테넌트 이름을 생략하면 모든 테넌트를 조회해요.

엔드포인트

GET /_plugins/_security/api/tenants
GET /_plugins/_security/api/tenants/{tenant}

경로 파라미터

다음 표는 사용할 수 있는 경로 파라미터를 보여줘요.

파라미터 데이터 타입 필수 여부 설명
tenant String 아니요 조회할 테넌트의 이름이에요. 생략하면 모든 테넌트가 반환돼요.

요청 예제

다음 요청은 모든 테넌트를 조회해요:

GET _plugins/_security/api/tenants

{% include copy-curl.html security=true %}

다음 요청은 human_resources 테넌트를 조회해요:

GET _plugins/_security/api/tenants/human_resources

{% include copy-curl.html security=true %}

응답 예제

모든 테넌트를 요청했을 때의 응답에는 기본 테넌트와 직접 생성한 테넌트가 함께 들어 있어요:

{
  "global_tenant": {
    "description": "Global tenant",
    "hidden": false,
    "reserved": true,
    "static": true
  },
  "admin_tenant": {
    "description": "Demo tenant for admin user",
    "hidden": false,
    "reserved": false,
    "static": false
  },
  "test-tenant": {
    "description": "A tenant for the test team.",
    "hidden": false,
    "reserved": false,
    "static": false
  },
  "human_resources": {
    "description": "A tenant for the human resources team.",
    "hidden": false,
    "reserved": false,
    "static": false
  }
}

테넌트 하나를 조회하면 응답에는 그 테넌트만 들어 있어요:

{
  "human_resources": {
    "description": "A tenant for the human resources team.",
    "hidden": false,
    "reserved": false,
    "static": false
  }
}

더 알아보기 (Learn more)