> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /get/job

```
URL: http://<db.host>:<db.port>/get/job
```

Get the status and result of asynchronously running job.  See the
[/create/job](/content/api/rest/create_job_rest) for starting an asynchronous job.
Some fields of the response are filled only after the submitted job has
finished execution.

## Input Parameter Description

<ParamField body="job_id" type="long">
  A unique identifier for the job whose status and result is to be fetched.
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.

  The default value is an empty map ( \{} ).

  <Expandable title="options">
    <ParamField body="job_tag">
      Job tag returned in call to create the job.
    </ParamField>
  </Expandable>
</ParamField>

## Output Parameter Description

The Kinetica server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query.  Here is a description of the various fields of the wrapper:

<ResponseField name="status" type="String">
  'OK' or 'ERROR'
</ResponseField>

<ResponseField name="message" type="String">
  Empty if success or an error message
</ResponseField>

<ResponseField name="data_type" type="String">
  'get\_job\_response' or 'none' in case of an error
</ResponseField>

<ResponseField name="data" type="String">
  Empty string
</ResponseField>

<ResponseField name="data_str" type="JSON or String">
  This embedded JSON represents the result of the /get/job endpoint:

  <Expandable title="data_str">
    <ResponseField name="endpoint" type="string">
      The endpoint which is being executed asynchronously.  E.g. '/alter/table'.
    </ResponseField>

    <ResponseField name="job_status" type="string">
      Status of the submitted job.

      * **RUNNING**: The job is currently executing.
      * **DONE**: The job execution has successfully completed and the response is included in the output parameter *job\_response* or output parameter *job\_response\_str* field.
      * **ERROR**: The job was attempted, but an error was encountered.  The output parameter *status\_map* contains the details of the error in error\_message.
      * **CANCELLED**: Job cancellation was requested while the execution was in progress.
    </ResponseField>

    <ResponseField name="running" type="boolean">
      True if the end point is still executing.
    </ResponseField>

    <ResponseField name="progress" type="int">
      Approximate percentage of the job completed.
    </ResponseField>

    <ResponseField name="successful" type="boolean">
      True if the job execution completed and no errors were encountered.
    </ResponseField>

    <ResponseField name="response_encoding" type="string">
      The encoding of the job result (contained in output parameter *job\_response* or output parameter *job\_response\_str*.

      * **binary**: The job result is binary-encoded.  It is contained in output parameter *job\_response*.
      * **json**: The job result is JSON-encoded.  It is contained in output parameter *job\_response\_str*.
    </ResponseField>

    <ResponseField name="job_response" type="bytes">
      The binary-encoded response of the job.  This field is populated only when the job has completed and output parameter *response\_encoding* is *binary*.
    </ResponseField>

    <ResponseField name="job_response_str" type="string">
      The json-encoded response of the job.  This field is populated only when the job has completed and output parameter *response\_encoding* is *json*.
    </ResponseField>

    <ResponseField name="status_map" type="map of string to strings">
      Map of various status strings for the executed job.

      <Expandable title="status_map">
        <ResponseField name="error_message">
          Explains what error occurred while running the job asynchronously.  This entry only exists when the job status is *ERROR*.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="info" type="map of string to strings">
      Additional information.
    </ResponseField>
  </Expandable>

  Empty string in case of an error.
</ResponseField>
