# Job

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

## Job

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

| Method                | Request                         | Response                                                                                                           |
| --------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**cancel**](#cancel) | [JobRequest](#jobrequest)       | [JobInfo](#jobinfo)                                                                                                |
| [**get**](#get)       | [GetJobRequest](#getjobrequest) | [JobInfo](#jobinfo)                                                                                                |
| [**list**](#list)     | [JobQuery](#jobquery)           | [JobsInfo](#jobsinfo)                                                                                              |
| [**stat**](#stat)     | [JobStatQuery](#jobstatquery)   | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### cancel

> **POST** /cost-analysis/v1/job/{job\_id}/cancel

| Type     | Message                   |
| -------- | ------------------------- |
| Request  | [JobRequest](#jobrequest) |
| Response | [JobInfo](#jobinfo)       |

### get

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

| Type     | Message                         |
| -------- | ------------------------------- |
| Request  | [GetJobRequest](#getjobrequest) |
| Response | [JobInfo](#jobinfo)             |

### list

> **GET** /cost-analysis/v1/jobs
>
> **POST** /cost-analysis/v1/jobs/search

| Type     | Message               |
| -------- | --------------------- |
| Request  | [JobQuery](#jobquery) |
| Response | [JobsInfo](#jobsinfo) |

### stat

> **POST** /cost-analysis/v1/jobs/stat

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

##

## Message

### ChangedInfo

| Field | Type   | Description |
| ----- | ------ | ----------- |
| start | string |             |
| end   | string |             |

### GetJobRequest

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

### JobInfo

| Field            | Type                                                                                                                | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------------------- | ----------- |
| job\_id          | string                                                                                                              |             |
| status           | <ul><li>SCOPE\_NONE</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)  |             |
| error\_code      | string                                                                                                              |             |
| error\_message   | string                                                                                                              |             |
| total\_tasks     | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                     |             |
| remained\_tasks  | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)                     |             |
| data\_source\_id | string                                                                                                              |             |
| domain\_id       | string                                                                                                              |             |
| created\_at      | string                                                                                                              |             |
| updated\_at      | string                                                                                                              |             |
| finished\_at     | string                                                                                                              |             |
| changed          | [list of ChangedInfo](#changedinfo)                                                                                 |             |

### JobQuery

| Field            | Type                                                                                                                | Required | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| query            | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query)                  | ✘        |             |
| job\_id          | string                                                                                                              | ✘        |             |
| status           | <ul><li>SCOPE\_NONE</li><li>IN\_PROGRESS</li><li>SUCCESS</li><li>FAILURE</li><li>TIMEOUT</li><li>CANCELED</li></ul> | ✘        |             |
| data\_source\_id | string                                                                                                              | ✘        |             |
| domain\_id       | string                                                                                                              | ✔        |             |

### JobRequest

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

### JobStatQuery

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

### JobsInfo

| Field        | Type                                                                                            | Description |
| ------------ | ----------------------------------------------------------------------------------------------- | ----------- |
| results      | [list of JobInfo](#jobinfo)                                                                     |             |
| 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.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.
