# 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) |             |


---

# 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/cost_analysis/v1/job-task.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.
