# JobTask

A JobTask is a task unit subdividing a Job. The division criteria are specified in each DataSource plugin.

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

\
\


## JobTask

**JobTask Methods:**

| Method                                                                                                              | Request                                                                                                                                 | Response                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#get)   | [JobTaskRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#jobtaskrequest)     | [JobTaskInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#jobtaskinfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#list) | [JobTaskQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#jobtaskquery)         | [JobTasksInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#jobtasksinfo) |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#stat) | [JobTaskStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#jobtaskstatquery) | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#struct)             |

\


### get

Gets a specific JobTask. Prints detailed information about the JobTask, including the relevant resources: DataSource and Job. The criteria used for dividing a Job into JobTasks can be found in the DataSource used, but the total count of divided JobTasks can be found by this method.

> **POST** /cost-analysis/v1/job-task/get

\{{< tabs " get " >\}}

\{{< tab "Request Example" >\}}

[JobTaskRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#jobtaskrequest)

* **job\_task\_id** (string) `Required`

\{{< highlight json >\}} { "job\_task\_id": "job-task-3622d860a776" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[JobTaskInfo](#JOBTASKINFO)

* **job\_task\_id** (string) `Required`
* **status** (Status) `Required`
* **options** (Struct) `Required`
* **created\_count** (int32) `Required`
* **error\_code** (string) `Required`
* **error\_message** (string) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **job\_id** (string) `Required`
* **data\_source\_id** (string) `Required`
* **created\_at** (string) `Required`
* **started\_at** (string) `Required`
* **updated\_at** (string) `Required`
* **finished\_at** (string) `Required`

\{{< highlight json >\}} { "job\_task\_id": "job-task-3622d860a776", "status": "SUCCESS", "options": { "month": "202207", "platform": "gcp" }, "created\_count": 1, "job\_id": "job-85cf2c385252", "data\_source\_id": "ds-c96609f5afeb", "domain\_id": "domain-58010aa2e451", "created\_at": "2022-07-17T16:00:08.266Z", "started\_at": "2022-07-17T16:01:28.243Z", "updated\_at": "2022-07-17T16:01:28.939Z", "finished\_at": "2022-07-17T16:01:28.939Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### list

Gets a list of all JobTasks. You can use a query to get a filtered list of JobTasks.

> **POST** /cost-analysis/v1/job-task/list

\{{< tabs " list " >\}}

\{{< tab "Request Example" >\}}

[JobTaskQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/cost_analysis/v1/JobTask/README.md#jobtaskquery)

* **query** (Query)
* **job\_task\_id** (string)
* **status** (Status)
* **workspace\_id** (string)
* **job\_id** (string)
* **data\_source\_id** (string)

\{{< highlight json >\}} { "query": {} } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[JobTasksInfo](#JOBTASKSINFO)

* **results** (JobTaskInfo) `Repeated` `Required`
* **total\_count** (int32) `Required`

\{{< highlight json >\}} { "results": \[ { "job\_task\_id": "job-task-3622d860a776", "status": "SUCCESS", "options": { "platform": "gcp", "month": "202207" }, "created\_count": 1, "job\_id": "job-85cf2c385252", "data\_source\_id": "ds-c96609f5afeb", "domain\_id": "domain-58010aa2e451", "created\_at": "2022-07-17T16:00:08.266Z", "started\_at": "2022-07-17T16:01:28.243Z", "updated\_at": "2022-07-17T16:01:28.939Z", "finished\_at": "2022-07-17T16:01:28.939Z" }, { "job\_task\_id": "job-task-038c0b076ec5", "status": "SUCCESS", "options": { "account": "257706363616", "start": "2022-07-01" }, "created\_count": 5756, "job\_id": "job-6b6765f757a9", "data\_source\_id": "ds-fcba92ca73b1", "domain\_id": "domain-58010aa2e451", "created\_at": "2022-07-17T16:00:05.099Z", "started\_at": "2022-07-17T16:00:47.356Z", "updated\_at": "2022-07-17T16:01:20.856Z", "finished\_at": "2022-07-17T16:01:20.856Z" } ], "total\_count": 720 } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### stat

> **POST** /cost-analysis/v1/job-task/stat

\
\


## Message

### JobTaskInfo

* **job\_task\_id** (string) `Required`
* **status** (Status) `Required`
* **options** (Struct) `Required`
* **created\_count** (int32) `Required`
* **error\_code** (string) `Required`
* **error\_message** (string) `Required`
* **resource\_group** (ResourceGroup) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **job\_id** (string) `Required`
* **data\_source\_id** (string) `Required`
* **created\_at** (string) `Required`
* **started\_at** (string) `Required`
* **updated\_at** (string) `Required`
*   **finished\_at** (string) `Required`

    \


### JobTaskQuery

* **query** (Query)
* **job\_task\_id** (string)
* **status** (Status)
* **workspace\_id** (string)
* **job\_id** (string)
*   **data\_source\_id** (string)

    \


### JobTaskRequest

*   **job\_task\_id** (string) `Required`

    \


### JobTaskStatQuery

*   **query** (StatisticsQuery) `Required`

    \


### JobTasksInfo

* **results** (JobTaskInfo) `Repeated` `Required`
*   **total\_count** (int32) `Required`

    \
