# Job Task

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

## JobTask

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

| Method            | Request                               | Response                                                                                                           |
| ----------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**list**](#list) | [JobTaskQuery](#jobtaskquery)         | [JobTasksInfo](#jobtasksinfo)                                                                                      |
| [**stat**](#stat) | [JobTaskStatQuery](#jobtaskstatquery) | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### list

> **GET** /inventory/v1/job-tasks
>
> **POST** /inventory/v1/job-tasks/search

| Type     | Message                       |
| -------- | ----------------------------- |
| Request  | [JobTaskQuery](#jobtaskquery) |
| Response | [JobTasksInfo](#jobtasksinfo) |

### stat

> **POST** /inventory/v1/job-tasks/stat

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

##

## Message

### JobTaskInfo

| Field                | Type                                                                                                                       | Description |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------- |
| job\_task\_id        | string                                                                                                                     |             |
| status               | <ul><li>JOB_TASK_STATE_NONE</li><li>PENDING</li><li>CANCELED</li><li>IN_PROGRESS</li><li>SUCCESS</li><li>FAILURE</li></ul> |             |
| created\_count       | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                            |             |
| updated\_count       | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                            |             |
| failure\_count       | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                            |             |
| deleted\_count       | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                            |             |
| disconnected\_count  | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                            |             |
| errors               | [list of ErrorInfo](#errorinfo)                                                                                            |             |
| job\_id              | string                                                                                                                     |             |
| secret\_id           | string                                                                                                                     |             |
| provider             | string                                                                                                                     |             |
| service\_account\_id | string                                                                                                                     |             |
| project\_id          | string                                                                                                                     |             |
| domain\_id           | string                                                                                                                     |             |
| created\_at          | string                                                                                                                     |             |
| started\_at          | string                                                                                                                     |             |
| finished\_at         | string                                                                                                                     |             |

### JobTaskQuery

| Field                | Type                                                                                                                       | Required | Description |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| query                | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query)                         | ✘        |             |
| job\_task\_id        | string                                                                                                                     | ✘        |             |
| status               | <ul><li>JOB_TASK_STATE_NONE</li><li>PENDING</li><li>CANCELED</li><li>IN_PROGRESS</li><li>SUCCESS</li><li>FAILURE</li></ul> | ✘        |             |
| job\_id              | string                                                                                                                     | ✘        |             |
| secret\_id           | string                                                                                                                     | ✘        |             |
| provider             | string                                                                                                                     | ✘        |             |
| service\_account\_id | string                                                                                                                     | ✘        |             |
| project\_id          | string                                                                                                                     | ✘        |             |
| domain\_id           | string                                                                                                                     | ✔        |             |

### JobTaskStatQuery

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

### JobTasksInfo

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