# Job Task

> **Package : spaceone.api.cost\_analysis.v1**

## JobTask

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

| Method            | Request                                 | Response                                                                                                           |
| ----------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**get**](#get)   | [GetJobTaskRequest](#getjobtaskrequest) | [JobTaskInfo](#jobtaskinfo)                                                                                        |
| [**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) |

### get

> **GET** /cost-analysis/v1/job-task/{job\_task\_id}

| Type     | Message                                 |
| -------- | --------------------------------------- |
| Request  | [GetJobTaskRequest](#getjobtaskrequest) |
| Response | [JobTaskInfo](#jobtaskinfo)             |

### list

> **GET** /cost-analysis/v1/job-tasks
>
> **POST** /cost-analysis/v1/job-tasks/search

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

### stat

> **POST** /cost-analysis/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

### GetJobTaskRequest

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

### JobTaskInfo

| Field            | Type                                                                                                                              | Description |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| job\_task\_id    | string                                                                                                                            |             |
| status           | <ul><li>SCOPE_NONE</li><li>PENDING</li><li>IN_PROGRESS</li><li>SUCCESS</li><li>FAILURE</li><li>TIMEOUT</li><li>CANCELED</li></ul> |             |
| options          | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto)                |             |
| created\_count   | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                                   |             |
| error\_code      | string                                                                                                                            |             |
| error\_message   | string                                                                                                                            |             |
| job\_id          | string                                                                                                                            |             |
| data\_source\_id | string                                                                                                                            |             |
| domain\_id       | string                                                                                                                            |             |
| created\_at      | string                                                                                                                            |             |
| started\_at      | string                                                                                                                            |             |
| updated\_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>SCOPE_NONE</li><li>PENDING</li><li>IN_PROGRESS</li><li>SUCCESS</li><li>FAILURE</li><li>TIMEOUT</li><li>CANCELED</li></ul> | ✘        |             |
| job\_id          | string                                                                                                                            | ✘        |             |
| data\_source\_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) |             |
