# Domain

> **Package : spaceone.api.identity.v1**

## Domain

{% hint style="info" %}
**Domain Methods:**
{% endhint %}

| NO | Method                                  | Request Type                                | Response Type                                                                                                      | Description |
| -- | --------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| 1  | [**create**](#create)                   | [CreateDomainRequest](#createdomainrequest) | [DomainInfo](#domaininfo)                                                                                          |             |
| 2  | [**update**](#update)                   | [UpdateDomainRequest](#updatedomainrequest) | [DomainInfo](#domaininfo)                                                                                          |             |
| 3  | [**delete**](#delete)                   | [DomainRequest](#domainrequest)             | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |             |
| 4  | [**enable**](#enable)                   | [DomainRequest](#domainrequest)             | [DomainInfo](#domaininfo)                                                                                          |             |
| 5  | [**disable**](#disable)                 | [DomainRequest](#domainrequest)             | [DomainInfo](#domaininfo)                                                                                          |             |
| 6  | [**get**](#get)                         | [GetDomainRequest](#getdomainrequest)       | [DomainInfo](#domaininfo)                                                                                          |             |
| 7  | [**list**](#list)                       | [DomainQuery](#domainquery)                 | [DomainsInfo](#domainsinfo)                                                                                        |             |
| 8  | [**stat**](#stat)                       | [DomainStatQuery](#domainstatquery)         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| 9  | [**get\_public\_key**](#get_public_key) | .spaceone.api.core.v1.AuthenticationRequest | .spaceone.api.core.v1.AuthenticationResponse                                                                       |             |
| 10 | [**get\_domain\_key**](#get_domain_key) | .spaceone.api.core.v1.AuthenticationRequest | [DomainKeyResponse](#domainkeyresponse)                                                                            |             |

### create

> **POST** /identity/v1/domains

| Type     | Message                                     |
| -------- | ------------------------------------------- |
| Request  | [CreateDomainRequest](#createdomainrequest) |
| Response | [DomainInfo](#domaininfo)                   |

### update

> **PUT** /identity/v1/domain/{domain\_id}

| Type     | Message                                     |
| -------- | ------------------------------------------- |
| Request  | [UpdateDomainRequest](#updatedomainrequest) |
| Response | [DomainInfo](#domaininfo)                   |

### delete

> **DELETE** /identity/v1/domain/{domain\_id}

| Type     | Message                                                                                                          |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| Request  | [DomainRequest](#domainrequest)                                                                                  |
| Response | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto) |

### enable

> **PUT** /identity/v1/domain/{domain\_id}

| Type     | Message                         |
| -------- | ------------------------------- |
| Request  | [DomainRequest](#domainrequest) |
| Response | [DomainInfo](#domaininfo)       |

### disable

> **PUT** /identity/v1/domain/{domain\_id}

| Type     | Message                         |
| -------- | ------------------------------- |
| Request  | [DomainRequest](#domainrequest) |
| Response | [DomainInfo](#domaininfo)       |

### get

> **GET** /identity/v1/domain/{domain\_id}

| Type     | Message                               |
| -------- | ------------------------------------- |
| Request  | [GetDomainRequest](#getdomainrequest) |
| Response | [DomainInfo](#domaininfo)             |

### list

> **GET** /identity/v1/domains
>
> **POST** /identity/v1/domains/search

| Type     | Message                     |
| -------- | --------------------------- |
| Request  | [DomainQuery](#domainquery) |
| Response | [DomainsInfo](#domainsinfo) |

### stat

> **POST** /identity/v1/domains/stat

| Type     | Message                                                                                                            |
| -------- | ------------------------------------------------------------------------------------------------------------------ |
| Request  | [DomainStatQuery](#domainstatquery)                                                                                |
| Response | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### get\_public\_key

| Type     | Message                                      |
| -------- | -------------------------------------------- |
| Request  | \[AuthenticationRequest]                     |
| Response | .spaceone.api.core.v1.AuthenticationResponse |

### get\_domain\_key

| Type     | Message                                 |
| -------- | --------------------------------------- |
| Request  | \[AuthenticationRequest]                |
| Response | [DomainKeyResponse](#domainkeyresponse) |

## Message

### CreateDomainRequest

| No | Field        | Type                                                                                                               | Required | Description |
| -- | ------------ | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| 1  | name         | string                                                                                                             | ✅        |             |
| 2  | plugin\_info | [PluginInfo](#plugininfo)                                                                                          | ❌        |             |
| 3  | config       | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
| 4  | tags         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |

### DomainInfo

| No | Field        | Type                                                                                                                     | Description |
| -- | ------------ | ------------------------------------------------------------------------------------------------------------------------ | ----------- |
| 1  | domain\_id   | string                                                                                                                   |             |
| 2  | name         | string                                                                                                                   |             |
| 3  | state        | <ul><li>NONE</li><li>ENABLED</li><li>DISABLED</li></ul>                                                                  |             |
| 4  | plugin\_info | [PluginInfo](#plugininfo)                                                                                                |             |
| 5  | config       | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto)       |             |
| 6  | tags         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto)       |             |
| 7  | created\_at  | [google.protobuf.Timestamp](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto) |             |
| 8  | deleted\_at  | [google.protobuf.Timestamp](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto) |             |

### DomainKeyResponse

| No | Field       | Type   | Description |
| -- | ----------- | ------ | ----------- |
| 1  | domain\_id  | string |             |
| 2  | domain\_key | string |             |

### DomainQuery

| No | Field      | Type                                                                                               | Required | Description |
| -- | ---------- | -------------------------------------------------------------------------------------------------- | -------- | ----------- |
| 1  | query      | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) | ❌        |             |
| 2  | domain\_id | string                                                                                             | ❌        |             |
| 3  | name       | string                                                                                             | ❌        |             |
| 4  | state      | <ul><li>NONE</li><li>ENABLED</li><li>DISABLED</li></ul>                                            | ❌        |             |

### DomainRequest

| No | Field      | Type   | Required | Description |
| -- | ---------- | ------ | -------- | ----------- |
| 1  | domain\_id | string | ✅        |             |

### DomainStatQuery

| No | Field | Type                                                                                                             | Required | Description |
| -- | ----- | ---------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| 1  | query | [spaceone.api.core.v1.StatisticsQuery](https://spaceone-dev.gitbook.io/api-reference/common-v1/statistics-query) | ✅        |             |

### DomainsInfo

| No | Field        | Type                                                                                            | Description |
| -- | ------------ | ----------------------------------------------------------------------------------------------- | ----------- |
| 1  | results      | [list of DomainInfo](#domaininfo)                                                               |             |
| 2  | total\_count | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |

### GetDomainRequest

| No | Field      | Type           | Required | Description |
| -- | ---------- | -------------- | -------- | ----------- |
| 1  | domain\_id | string         | ✅        |             |
| 2  | only       | list of string | ❌        |             |

### PluginInfo

| No | Field      | Type                                                                                                               | Description |
| -- | ---------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| 1  | plugin\_id | string                                                                                                             |             |
| 2  | version    | string                                                                                                             |             |
| 3  | secret\_id | string                                                                                                             |             |
| 4  | options    | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |

### UpdateDomainRequest

| No | Field        | Type                                                                                                               | Required | Description |
| -- | ------------ | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| 1  | domain\_id   | string                                                                                                             | ✅        |             |
| 2  | plugin\_info | [PluginInfo](#plugininfo)                                                                                          | ❌        |             |
| 3  | config       | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
| 4  | tags         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        |             |
