
## Overview
<p align="justify">
This endpoint allows users to retrieve detailed information about a specific job within a workflow by providing both the `workflow_id` and `job_id`. It returns metadata including job status, progress, timing details, associated tasks, and cost. Authentication via a bearer token is required.

- Method: `GET`

- URL: `/v0/workflows/{workflow_id}/jobs/{job_id}`

- Operation: Get detailed information of a job

- Authentication Required: Yes
</p>

## Authorization
<p align="justify">
You need the **api key** which you can get from the **API** tab in **Organization Settings**. The api key is required in almost all the commands

```json
Authorization: <YOUR_API_KEY>
```
</p>

## Path Parameters
<p align="justify">
The `workflow_id` identifies the workflow context in which the job was created, and the `job_id` uniquely identifies the job. Together, they ensure precise retrieval of the correct job’s full metadata from within a larger workflow system.

| Name         | Type   | Required | Description                                                  |
|--------------|--------|----------|--------------------------------------------------------------|
| `workflow_id`  | `string` | Yes      | Unique identifier of the workflow                            |
| `job_id`       | `string` | Yes      | Unique identifier of the job within the specified workflow   |
</p>

## Response

<p align="justify">
A **200 OK** response returns full metadata for a job, including execution timestamps, creator, duration, cost, and progress. It also includes task and validation error details, if applicable. This response is useful for monitoring, debugging, or auditing purposes in workflow pipelines.

| Name              | Type       | Description                                                       |
|-------------------|------------|-------------------------------------------------------------------|
| `created_by`        | `string`     | ID of the user who created the job                               |
| `status`            | `string`     | Current status of the job (e.g., running, completed, failed)      |
| `time_taken`        | `string`     | Actual time taken to complete the job                            |
| `id`                | `string`     | Unique identifier of the job                                     |
| `tasks`             | `object[]`   | List of tasks executed in this job                               |
| `val_errors`        | `object[]`   | List of validation errors encountered                            |
| `spec`              | `integer[]`  | Raw specification values associated with the job                 |
| `cost`              | `integer`    | Estimated or actual cost of job execution                        |
| `workflow_id`       | `string`     | ID of the workflow the job belongs to                            |
| `updated_at`        | `string`     | Timestamp of the last update to the job                          |
| `finished_at`       | `string`     | Timestamp when job completed                                     |
| `exec_created_at`   | `string`     | Timestamp when execution of job started                          |
| `exec_updated_at`   | `string`     | Timestamp of last execution-related update                       |
| `created_at`        | `string`     | Timestamp when the job was originally created                    |
| `estimated_duration`| `integer`    | Estimated time to complete the job in seconds                    |
| `progress`          | `string`    | Job progress, typically a percentage (e.g., "75%")               |


Here is a sample **200** response: 
```json 200
{
  "created_by": "<string>",
  "status": "<string>",
  "time_taken": "<string>",
  "id": "<string>",
  "tasks": [
    {
      "id": "<string>",
      "info_logs": [
        123
      ],
      "created_at": "<string>",
      "updated_at": "<string>",
      "finished_at": "<string>",
      "estimated_time_duration": 123,
      "time_taken": "<string>",
      "status": "<string>",
      "state_msg": "<string>",
      "inputs": [
        123
      ],
      "result": [
        123
      ],
      "depends_on": [
        "<string>"
      ],
      "name": "<string>",
      "progress": 123,
      "disclaimer": [
        "<string>"
      ],
      "recv_time": "<string>",
      "send_time": "<string>",
      "block_inf_start_time": "<string>",
      "block_inf_end_time": "<string>",
      "block_info": {
        "id": "<string>",
        "name": "<string>",
        "version": "<string>"
      },
      "err_msg": "<string>",
      "failure_type": "<string>"
    }
  ],
  "val_errors": [
    {
      "from": "<string>",
      "to": "<string>",
      "err": "<string>",
      "reason": "<string>",
      "component_name": "<string>"
    }
  ],
  "spec": [
    123
  ],
  "cost": 123,
  "workflow_id": "<string>",
  "updated_at": "<string>",
  "finished_at": "<string>",
  "exec_created_at": "<string>",
  "exec_updated_at": "<string>",
  "created_at": "<string>",
  "estimated_duration": 123,
  "progress": "<string>"
}
```

A **400 Bad Request** response occurs if parameters are malformed or missing. A **403 Forbidden** indicates the user does not have access to the requested workflow or job. The response includes structured error details such as code, message, and optional context for resolving access issues.

```json 400 403
{
  "error": {
    "code": "<string>",
    "details": "<any>",
    "message": "<string>"
  }
}
```
</p>

## How to use the endpoint
<p align="justify">
- **Construct your Request:**  
    Gather the workflow_id and job_id of the job you want to inspect.

- **Send the Request:**  
    After required path parameters are added make a GET request to `https://api.pixxel.space/v0/workflows/{workflow_id}/jobs/{job_id}`.

- **Examine the Response:**  
    On success, parse the job metadata to understand execution status, cost, timing, and any issues. Handle errors with appropriate fallback and retry mechanisms.
</p>