Get job results

JOB RESULT

GET 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

NameTypeDescription

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

NameTypeDescription

x-api-key

string

API key for authentication

{
    "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
}

ATTACHMENT

GET 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

NameTypeDescription

result_url

string

Result URL returned by the GET job result API

Headers

NameTypeDescription

x-api-key

string

API key for authentication

The API will redirect to a signed URL of the attachment

Result Object

{
  "legend": [
    {
      "id": "70d3d997-ce98-4e4d-97b4-46d97037c312",
      "text": "crosswalk",
      "color": "rgb(244, 35, 242)",
      "label_key": 0,
      "value": "crosswalk"
    },
    {
      "id": "4a6aca59-944a-475b-8043-66aeb63ae7cf",
      "text": "MINIVAN # 1",
      "color": "rgb(70, 90, 110)",
      "label_key": 1,
      "value": "MINIVAN #1"
    },
    {
      "id": "286e0022-9229-4946-99b3-09f8ae5c79d0",
      "text": "MINIVAN # 2",
      "color": "rgb(143, 0, 214)",
      "label_key": 2,
      "value": "MINIVAN # 2"
    }
  ],
  "url": "https://playment-uploads.s3.ap-south-1.amazonaws.com/submissions/default/5a375fc2-fb4f-4d4b-808f-241ed881b74f_data.pcd"
}

To access the PCD mask (url in the result object), you will need to use the GET Attachment API.

# .PCD v0.7 - Point Cloud Data file format 
VERSION 0.7
FIELDS x y z label_key
SIZE 4 4 4 4
TYPE F F F F
COUNT 1 1 1 1
WIDTH 47286
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 47286
DATA ascii
5075.773 3756.887 107.923 0
5076.011 3756.876 107.865 0
5076.116 3756.826 107.844 1
5076.860 3756.975 107.648 1
5077.045 3756.954 107.605 2
5077.237 3756.937 107.559 3
5077.441 3756.924 107.511 4
5077.599 3756.902 107.474 5
5077.780 3756.885 107.432 6
5077.955 3756.862 107.391 7

For each point, there is a label with an int value which can be used to look up the label value by comparing with the label_key in the legend.

Last updated