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

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

{
    "data": {
        "project_id": "af329e2b-08e8-4e52-bdb7-79277364030d",
        "reference_id": "videosegdemo",
        "job_id": "ec862ac3-55df-425f-ab06-fab4eb933116",
        "batch_id": "3952b8a4-afd5-4f51-adf6-e18a2d2af97d",
        "status": "completed",
        "work_flow_id": "2b2446ad-9c08-43c5-ba62-9a756ef87dd0",
        "tag": "2b2446ad-9c08-43c5-ba62-9a756ef87dd0",
        "priority_weight": 5,
        "result": "http://d5g2iurv6azza.cloudfront.net/cl/76a5e6d0-0c88-426c-8fc6-c28ca79221ad/pr/af329e2b-08e8-4e52-bdb7-79277364030d/bt/3952b8a4-afd5-4f51-adf6-e18a2d2af97d/jb/ec862ac3-55df-425f-ab06-fab4eb933116/submission_result/ec862ac3-55df-425f-ab06-fab4eb933116.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

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

{
  "data": {
    "annotation_data": {
      "annotations": [
        {
          "_id": "c2d1b627-2af8-49ae-b4ab-0c94571e2b2d",
          "attributes": [],
          "frame_id": "frame1",
          "track_id": "3f05676e-c959-43d4-a95b-a1168caabe35"
        },
        {
          "_id": "ae41fc43-a6f5-4c29-ab3b-70a294aaac5d",
          "attributes": [],
          "frame_id": "frame2",
          "track_id": "3f05676e-c959-43d4-a95b-a1168caabe35"
        }
      ],
      "frames": [
        {
          "_id": "frame1"
        },
        {
          "_id": "frame2"
        }
      ],
      "legend": {
        "#090575": "Ground",
        "#127a8e": "Vegetation",
        "#241b51": "Person # 1",
        "#60b7e0": "Person",
        "#d32142": "Car",
        "#db415d": "Debris",
        "#dd900b": "Misc"
      },
      "masks": [
        {
          "_id": "",
          "frame_id": "frame1",
          "mask_url": "http://d5g2iurv6azza.cloudfront.net/cl/76a5e6d0-0c88-426c-8fc6-c28ca79221ad/pr/af329e2b-08e8-4e52-bdb7-79277364030d/bt/3952b8a4-afd5-4f51-adf6-e18a2d2af97d/jb/ec862ac3-55df-425f-ab06-fab4eb933116/qs/b583a64f-8765-44df-bb7e-78835ea5a7ef/raster_mask/290a0c90-e6b5-4610-8dfe-3fb8880e2b1f.png"
        },
        {
          "_id": "",
          "frame_id": "frame2",
          "mask_url": "http://d5g2iurv6azza.cloudfront.net/cl/76a5e6d0-0c88-426c-8fc6-c28ca79221ad/pr/af329e2b-08e8-4e52-bdb7-79277364030d/bt/3952b8a4-afd5-4f51-adf6-e18a2d2af97d/jb/ec862ac3-55df-425f-ab06-fab4eb933116/qs/b583a64f-8765-44df-bb7e-78835ea5a7ef/raster_mask/c07e1b89-c308-4482-acab-af1e3953984e.png"
        }
      ],
      "tracks": [
        {
          "_id": "3f05676e-c959-43d4-a95b-a1168caabe35",
          "class_id": "631aab77-e50d-412f-aa0c-e7e1361f40f9",
          "class_label": "Person",
          "color": "#241b51",
          "value": "Person # 1"
        }
      ]
    },
    "video_data": {
      "frames": [
        {
          "_id": "00000000-0000-0000-0000-000000000000",
          "frame_id": "frame1",
          "meta_data": null,
          "ref_id": "",
          "src": "http://d5g2iurv6azza.cloudfront.net/cl/76a5e6d0-0c88-426c-8fc6-c28ca79221ad/pr/af329e2b-08e8-4e52-bdb7-79277364030d/bt/3952b8a4-afd5-4f51-adf6-e18a2d2af97d/jb/ec862ac3-55df-425f-ab06-fab4eb933116/validated_data/4c60068d-b64a-4336-ad20-91f4d22600a4",
          "src_original": "https://playment-data-uploads.s3.ap-south-1.amazonaws.com/clients/cde4d0fb-63c3-43f0-bb46-a11ebc6d4455/projects/a6eb8c75-bdf0-4e5e-bbb3-b140db8350ac/batch_upload_data/64513983-a554-47f1-ae38-50390ea21c5c/ezgif-4-61dbf91b9c12-jpg/ezgif-frame-001.jpg"
        },
        {
          "_id": "00000000-0000-0000-0000-000000000000",
          "frame_id": "frame2",
          "meta_data": null,
          "ref_id": "",
          "src": "http://d5g2iurv6azza.cloudfront.net/cl/76a5e6d0-0c88-426c-8fc6-c28ca79221ad/pr/af329e2b-08e8-4e52-bdb7-79277364030d/bt/3952b8a4-afd5-4f51-adf6-e18a2d2af97d/jb/ec862ac3-55df-425f-ab06-fab4eb933116/validated_data/7d22c0e6-ad1b-4293-b4e6-99f877b2a70e",
          "src_original": "https://playment-data-uploads.s3.ap-south-1.amazonaws.com/clients/cde4d0fb-63c3-43f0-bb46-a11ebc6d4455/projects/a6eb8c75-bdf0-4e5e-bbb3-b140db8350ac/batch_upload_data/64513983-a554-47f1-ae38-50390ea21c5c/ezgif-4-61dbf91b9c12-jpg/ezgif-frame-002.jpg"
        }
      ]
    }
  },
  "frame1": "http://d5g2iurv6azza.cloudfront.net/cl/76a5e6d0-0c88-426c-8fc6-c28ca79221ad/pr/af329e2b-08e8-4e52-bdb7-79277364030d/bt/3952b8a4-afd5-4f51-adf6-e18a2d2af97d/jb/ec862ac3-55df-425f-ab06-fab4eb933116/batch_export_result/videosegdemo.frame1.png",
  "frame2": "http://d5g2iurv6azza.cloudfront.net/cl/76a5e6d0-0c88-426c-8fc6-c28ca79221ad/pr/af329e2b-08e8-4e52-bdb7-79277364030d/bt/3952b8a4-afd5-4f51-adf6-e18a2d2af97d/jb/ec862ac3-55df-425f-ab06-fab4eb933116/batch_export_result/videosegdemo.frame2.png"
}

Result Object

{
  "data": {
    "annotation_data": {
      "annotations": [],
      "frames": [],
      "legend": {},
      "masks": [],
      "tracks": []
    },
    "video_data": {
      "frames": []
    }
  },
}

The data.annotations_data.annotations list contains objects where each object is an annotation. You can check the data structures in detail below:

"attributes": [], 
"frame_id": "frame1", 
"track_id": "3f05676e-c959-43d4-a95b-a1168caabe35"

Key

Description

frame_id

A foreign key to join with the frame object in sensor_data.frames

track_id

All annotations across frames, belonging to the same object have a common track_id

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

The mask is a PNG file with four 8-bit channels. The first 3 channels are R, G & B respectively. These can be used to obtain a hex code for any pixel, which then maps to a class or instance based on thelegend object.

Last updated