# Output format

## JOB RESULT

<mark style="color:blue;">`GET`</mark> `https://api.playment.io/v1/projects/:project_id/jobs/:job_id`

This endpoint allows you to get the annotations created on a job.

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| job\_id     | string | ID of the job. You would have received this ID in the response when you created the job. |
| project\_id | string | ID of the project where the job was created                                              |

#### Headers

| Name      | Type   | Description                |
| --------- | ------ | -------------------------- |
| x-api-key | string | API key for authentication |

{% tabs %}
{% tab title="200 Job results successfully retrieved." %}

```javascript
{
    "data": {
        "project_id": "905ea3ee-6f62-4bb7-8c31-471e486d9202",
        "reference_id": "001",
        "job_id": "3f3e8675-ca69-46d7-aa34-96f90fcbb732",
        "batch_id": "468b6ae3-e98d-4d08-9427-b6e7a016054c",
        "status": "completed",
        "work_flow_id": "51bb440c-f0ed-4286-8984-ea399cbc1f9w",
        "priority_weight": 5,
        "tag": "2aae1234-acac-1234-eeff-12a22a237bbc",//tag is the workflow_id for the job  
        "result": "https://playment-data-uploads.s3.ap-south-1.amazonaws.com/sample-result.json"
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

## ATTACHMENT

<mark style="color:blue;">`GET`</mark> `https://api.playment.io/v1/attachments?url=:result_url`

The *result\_url* (`data.result`) returned by the GET Job result API is a private URL (Well, it's public till 15th July 2021, after which we'll enforce it to be private). You need to use this Attachment access API to securely fetch the results. Please refer to the Attachment Access API document for more detail.

#### Path Parameters

| Name        | Type   | Description                                   |
| ----------- | ------ | --------------------------------------------- |
| result\_url | string | Result URL returned by the GET job result API |

#### Headers

| Name      | Type   | Description                |
| --------- | ------ | -------------------------- |
| x-api-key | string | API key for authentication |

{% tabs %}
{% tab title="200 " %}

```
The API will redirect to a signed URL of the attachment
```

{% endtab %}
{% endtabs %}

## Result Object

```javascript
{
  "data": {
    "annotation_data": {
      "annotations": []
    },
    "sensor_data": {
      "frames": [] //This is the same list you sent while creating the job
    }
  }
}
```

The annotations list contains objects, where each object is an *tracker*. A tracker tracks an object across frames. The `frames` key in the tracker object maps each *annotation object* in the tracker to the `frame_id` it belongs to.&#x20;

```javascript
{
  "_id": "e94425cc-0984-4af1-95d5-b73234abcd63",
  "type": "cuboid3d",
  "color": "rgb(185,100,192)",
  "label": "Car",
  "frames" : {
    "frame001" : {<annotation_object>}
  }
}
```

{% tabs %}
{% tab title="3D Bounding Box" %}

```javascript
{
  "_id": "221efcfe-ca02-4845-8582-53d5e969edfe",
  "color": "rgb(185,100,192)",
  "label": "Car",
  "center": {
    "x": -7.9712,
    "y": -1.3861,
    "z": 1.1033
  },
  "keyFrame": true,
  "rotation": {
    "_w": -0.9952638830524981,
    "_x": -0.008698959266850841,
    "_y": -0.0006932023355776871,
    "_z": -0.09681761549149911
  },
  "attributes": {},
  "dimensions": {
    "width": 1.8678,
    "height": 1.9448,
    "length": 4.8818
  }
}
```

{% endtab %}

{% tab title="3D Lines" %}

```json
{
    "_id": "30207bd4-0241-4cf2-b077-4a3db3588753",
    "label": "Single Solid Line",
    "type": "line3d",
    "attributes": {
        "Color": {
            "value": "Yellow"
        }
    },
    "coordinates": [
        {
            "x": 0.525618,
            "y": 0.301574,
            "z": 0.601574
        },
        {
            "x": 0.494912,
            "y": 0.481149,
            "z": 0.201574
        },
        {
            "x": 0.580676,
            "y": 0.482843,
            "z": 0.101574
        }
    ],
    "edges": {
        "e1": [
            "p1",
            "p2"
        ],
        "e2": [
            "p2",
            "p3"
        ]
    },
    "sensor_id": "lidar",
    "frame_id": "frame001",
    "track_id": "2b1e061c-5a30-4ce3-b176-8fb04b058a6e",
    "color": "rgb(254,109,236)"
}
```

{% endtab %}

{% tab title="3D Keypoints" %}

```json
{
    "_id": "30207bd4-0241-4cf2-b077-4a3db3588753",
    "label": "keypoints3d",
    "type": "keypoints3d",
    "attributes": {
        "static": {
            "state": "editable",
            "value": "b1"
        },
        "occlusion": {
            "state": "editable",
            "value": "a1"
        }
    },
    "keypoints": {
        "p1" : {
            "x": 0.525618,
            "y": 0.301574,
            "z": 0.212222,
            "label" : "top"
        },
        "p2" : {
            "x": 0.494912,
            "y": 0.481149,
            "z": 0.212222,
            "label" : "left"
        },
        "p3" : {
            "x": 0.580676,
            "y": 0.482843,
            "z": 0.212222,
            "label" : "right"
        }
    },
    "edges": {
        "e1": [
            "p1",
            "p2"
        ],
        "e2": [
            "p2",
            "p3"
        ],
        "e3": [
            "p3",
            "p1"
        ]
    }
}
```

{% endtab %}
{% endtabs %}
