# Server

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

## Server

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

| Method                     | Request                                       | Response                                                                                                           |
| -------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create)      | [CreateServerRequest](#createserverrequest)   | [ServerInfo](#serverinfo)                                                                                          |
| [**update**](#update)      | [UpdateServerRequest](#updateserverrequest)   | [ServerInfo](#serverinfo)                                                                                          |
| [**pin\_data**](#pin_data) | [PinServerDataRequest](#pinserverdatarequest) | [ServerInfo](#serverinfo)                                                                                          |
| [**delete**](#delete)      | [ServerRequest](#serverrequest)               | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)            | [GetServerRequest](#getserverrequest)         | [ServerInfo](#serverinfo)                                                                                          |
| [**list**](#list)          | [ServerQuery](#serverquery)                   | [ServersInfo](#serversinfo)                                                                                        |
| [**stat**](#stat)          | [ServerStatQuery](#serverstatquery)           | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### create

> **POST** /inventory/v1/servers

| Type     | Message                                     |
| -------- | ------------------------------------------- |
| Request  | [CreateServerRequest](#createserverrequest) |
| Response | [ServerInfo](#serverinfo)                   |

### update

> **PUT** /inventory/v1/server/{server\_id}

| Type     | Message                                     |
| -------- | ------------------------------------------- |
| Request  | [UpdateServerRequest](#updateserverrequest) |
| Response | [ServerInfo](#serverinfo)                   |

### pin\_data

> **PUT** /inventory/v1/server/{server\_id}/pin-data

| Type     | Message                                       |
| -------- | --------------------------------------------- |
| Request  | [PinServerDataRequest](#pinserverdatarequest) |
| Response | [ServerInfo](#serverinfo)                     |

### delete

> **DELETE** /inventory/v1/server/{server\_id}

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

### get

> **GET** /inventory/v1/server/{server\_id}

| Type     | Message                               |
| -------- | ------------------------------------- |
| Request  | [GetServerRequest](#getserverrequest) |
| Response | [ServerInfo](#serverinfo)             |

### list

> **GET** /inventory/v1/servers
>
> **POST** /inventory/v1/servers/search

| Type     | Message                     |
| -------- | --------------------------- |
| Request  | [ServerQuery](#serverquery) |
| Response | [ServersInfo](#serversinfo) |

### stat

> **POST** /inventory/v1/servers/stat

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

##

## Message

### CreateServerRequest

| Field                 | Type                                                                                                               | Required | Description |
| --------------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| name                  | string                                                                                                             | ✘        |             |
| primary\_ip\_address  | string                                                                                                             | ✘        |             |
| os\_type              | <ul><li>OS\_TYPE\_NONE</li><li>LINUX</li><li>WINDOWS</li></ul>                                                     | ✔        |             |
| account               | string                                                                                                             | ✘        |             |
| instance\_type        | string                                                                                                             | ✘        |             |
| launched\_at          | string                                                                                                             | ✘        |             |
| provider              | string                                                                                                             | ✘        |             |
| cloud\_service\_group | string                                                                                                             | ✘        |             |
| cloud\_service\_type  | string                                                                                                             | ✘        |             |
| region\_code          | string                                                                                                             | ✘        |             |
| data                  | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| metadata              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| nics                  | [list of ServerNIC](#servernic)                                                                                    | ✘        |             |
| disks                 | [list of ServerDisk](#serverdisk)                                                                                  | ✘        |             |
| reference             | [ServerReference](#serverreference)                                                                                | ✘        |             |
| tags                  | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| project\_id           | string                                                                                                             | ✘        |             |
| domain\_id            | string                                                                                                             | ✔        |             |

### GetServerRequest

| Field      | Type           | Required | Description |
| ---------- | -------------- | :------: | ----------- |
| server\_id | string         |     ✔    |             |
| domain\_id | string         |     ✔    |             |
| only       | list of string |     ✘    |             |

### PinServerDataRequest

| Field      | Type           | Required | Description |
| ---------- | -------------- | :------: | ----------- |
| server\_id | string         |     ✔    |             |
| keys       | list of string |     ✔    |             |
| domain\_id | string         |     ✔    |             |

### ServerDisk

| Field         | Type                                                                                                               | Required | Description |
| ------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| device\_index | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                    |     ✔    |             |
| device        | string                                                                                                             |     ✘    |             |
| disk\_type    | string                                                                                                             |     ✘    |             |
| size          | float                                                                                                              |     ✘    |             |
| tags          | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |

### ServerInfo

| Field                 | Type                                                                                                               | Description |
| --------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| server\_id            | string                                                                                                             |             |
| name                  | string                                                                                                             |             |
| state                 | string                                                                                                             |             |
| primary\_ip\_address  | string                                                                                                             |             |
| ip\_addresses         | list of string                                                                                                     |             |
| os\_type              | <ul><li>OS\_TYPE\_NONE</li><li>LINUX</li><li>WINDOWS</li></ul>                                                     |             |
| account               | string                                                                                                             |             |
| instance\_type        | string                                                                                                             |             |
| provider              | string                                                                                                             |             |
| cloud\_service\_group | string                                                                                                             |             |
| cloud\_service\_type  | string                                                                                                             |             |
| region\_code          | string                                                                                                             |             |
| data                  | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| metadata              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| nics                  | [list of ServerNIC](#servernic)                                                                                    |             |
| disks                 | [list of ServerDisk](#serverdisk)                                                                                  |             |
| reference             | [ServerReference](#serverreference)                                                                                |             |
| tags                  | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| collection\_info      | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| project\_id           | string                                                                                                             |             |
| domain\_id            | string                                                                                                             |             |
| created\_at           | string                                                                                                             |             |
| updated\_at           | string                                                                                                             |             |
| deleted\_at           | string                                                                                                             |             |
| launched\_at          | string                                                                                                             |             |

### ServerNIC

| Field               | Type                                                                                                               | Required | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| device\_index       | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                    |     ✔    |             |
| device              | string                                                                                                             |     ✘    |             |
| nic\_type           | string                                                                                                             |     ✘    |             |
| ip\_addresses       | list of string                                                                                                     |     ✔    |             |
| cidr                | string                                                                                                             |     ✘    |             |
| mac\_address        | string                                                                                                             |     ✘    |             |
| public\_ip\_address | string                                                                                                             |     ✘    |             |
| tags                | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |

### ServerQuery

| Field                 | Type                                                                                               | Required | Description |
| --------------------- | -------------------------------------------------------------------------------------------------- | -------- | ----------- |
| query                 | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) | ✘        |             |
| server\_id            | string                                                                                             | ✘        |             |
| name                  | string                                                                                             | ✘        |             |
| state                 | string                                                                                             | ✘        |             |
| primary\_ip\_address  | string                                                                                             | ✘        |             |
| ip\_addresses         | string                                                                                             | ✘        |             |
| os\_type              | <ul><li>OS\_TYPE\_NONE</li><li>LINUX</li><li>WINDOWS</li></ul>                                     | ✘        |             |
| account               | string                                                                                             | ✘        |             |
| instance\_type        | string                                                                                             | ✘        |             |
| provider              | string                                                                                             | ✘        |             |
| cloud\_service\_group | string                                                                                             | ✘        |             |
| cloud\_service\_type  | string                                                                                             | ✘        |             |
| region\_code          | string                                                                                             | ✘        |             |
| resource\_group\_id   | string                                                                                             | ✘        |             |
| project\_id           | string                                                                                             | ✘        |             |
| project\_group\_id    | string                                                                                             | ✘        |             |
| domain\_id            | string                                                                                             | ✔        |             |

### ServerReference

| Field          | Type   | Description |
| -------------- | ------ | ----------- |
| resource\_id   | string |             |
| external\_link | string |             |

### ServerRequest

| Field      | Type   | Required | Description |
| ---------- | ------ | :------: | ----------- |
| server\_id | string |     ✔    |             |
| domain\_id | string |     ✔    |             |

### ServerStatQuery

| Field               | Type                                                                                                             | Required | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------------------- | :------: | ----------- |
| query               | [spaceone.api.core.v1.StatisticsQuery](https://spaceone-dev.gitbook.io/api-reference/common-v1/statistics-query) |     ✔    |             |
| domain\_id          | string                                                                                                           |     ✔    |             |
| resource\_group\_id | string                                                                                                           |     ✘    |             |

### ServersInfo

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

### UpdateServerRequest

| Field                 | Type                                                                                                               | Required | Description |
| --------------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
| server\_id            | string                                                                                                             | ✔        |             |
| name                  | string                                                                                                             | ✘        |             |
| primary\_ip\_address  | string                                                                                                             | ✘        |             |
| os\_type              | <ul><li>OS\_TYPE\_NONE</li><li>LINUX</li><li>WINDOWS</li></ul>                                                     | ✘        |             |
| account               | string                                                                                                             | ✘        |             |
| instance\_type        | string                                                                                                             | ✘        |             |
| launched\_at          | string                                                                                                             | ✘        |             |
| provider              | string                                                                                                             | ✘        |             |
| cloud\_service\_group | string                                                                                                             | ✘        |             |
| cloud\_service\_type  | string                                                                                                             | ✘        |             |
| region\_code          | string                                                                                                             | ✘        |             |
| data                  | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| metadata              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| nics                  | [list of ServerNIC](#servernic)                                                                                    | ✘        |             |
| disks                 | [list of ServerDisk](#serverdisk)                                                                                  | ✘        |             |
| reference             | [ServerReference](#serverreference)                                                                                | ✘        |             |
| tags                  | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✘        |             |
| project\_id           | string                                                                                                             | ✘        |             |
| domain\_id            | string                                                                                                             | ✔        |             |
| release\_region       | bool                                                                                                               | ✘        |             |
| release\_project      | bool                                                                                                               | ✘        |             |


---

# Agent Instructions: 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:

```
GET https://spaceone-dev.gitbook.io/spaceone-apis/inventory/v1/server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
