# Query

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

## Message

### AggregateCount

| No | Field | Type   | Description |
| -- | ----- | ------ | ----------- |
| 1  | name  | string |             |

### AggregateGroup

| No | Field  | Type                                                | Description |
| -- | ------ | --------------------------------------------------- | ----------- |
| 1  | keys   | [list of AggregateGroupKey](#aggregategroupkey)     |             |
| 2  | fields | [list of AggregateGroupField](#aggregategroupfield) |             |

### AggregateGroupField

| No | Field        | Type   | Description |
| -- | ------------ | ------ | ----------- |
| 1  | key          | string |             |
| 2  | k            | string |             |
| 3  | name         | string |             |
| 4  | n            | string |             |
| 5  | operator     | string |             |
| 6  | o            | string |             |
| 7  | value        | string |             |
| 8  | v            | string |             |
| 9  | date\_format | string |             |

### AggregateGroupKey

| No | Field        | Type   | Description |
| -- | ------------ | ------ | ----------- |
| 1  | key          | string |             |
| 2  | k            | string |             |
| 3  | name         | string |             |
| 4  | n            | string |             |
| 5  | date\_format | string |             |

### AggregateSort

| No | Field | Type   | Description |
| -- | ----- | ------ | ----------- |
| 1  | key   | string |             |
| 2  | desc  | bool   |             |

### AggregateUnwind

| No | Field | Type   | Description |
| -- | ----- | ------ | ----------- |
| 1  | path  | string |             |

### Filter

| No | Field    | Type                                                                                            | Description |
| -- | -------- | ----------------------------------------------------------------------------------------------- | ----------- |
| 1  | key      | string                                                                                          |             |
| 2  | k        | string                                                                                          |             |
| 3  | value    | [google.protobuf.Value](https://developers.google.com/protocol-buffers/docs/reference/overview) |             |
| 4  | v        | [google.protobuf.Value](https://developers.google.com/protocol-buffers/docs/reference/overview) |             |
| 5  | operator | string                                                                                          |             |
| 6  | o        | string                                                                                          |             |

### Page

| No | Field | Type                                                                                             | Description |
| -- | ----- | ------------------------------------------------------------------------------------------------ | ----------- |
| 1  | start | [uint32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |
| 2  | limit | [uint32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |

### Query

| No | Field       | Type                      | Description |
| -- | ----------- | ------------------------- | ----------- |
| 1  | filter      | [list of Filter](#filter) |             |
| 2  | filter\_or  | [list of Filter](#filter) |             |
| 3  | sort        | [Sort](#sort)             |             |
| 4  | page        | [Page](#page)             |             |
| 5  | minimal     | bool                      |             |
| 6  | count\_only | bool                      |             |
| 7  | only        | list of string            |             |
| 8  | keyword     | string                    |             |

### Sort

| No | Field | Type   | Description |
| -- | ----- | ------ | ----------- |
| 1  | key   | string |             |
| 2  | desc  | bool   |             |

### StatisticsAggregate

| No | Field  | Type                                | Description |
| -- | ------ | ----------------------------------- | ----------- |
| 1  | unwind | [AggregateUnwind](#aggregateunwind) |             |
| 2  | group  | [AggregateGroup](#aggregategroup)   |             |
| 3  | count  | [AggregateCount](#aggregatecount)   |             |
| 4  | sort   | [AggregateSort](#aggregatesort)     |             |

### StatisticsQuery

| No | Field      | Type                                                | Description |
| -- | ---------- | --------------------------------------------------- | ----------- |
| 1  | filter     | [list of Filter](#filter)                           |             |
| 2  | filter\_or | [list of Filter](#filter)                           |             |
| 3  | aggregate  | [list of StatisticsAggregate](#statisticsaggregate) |             |
| 4  | page       | [Page](#page)                                       |             |
| 5  | distinct   | string                                              |             |
| 6  | keyword    | string                                              |             |
