Create a job

A JOB

POST https://api.playment.io/v1/projects/:project_id/jobs

Path Parameters

Name
Type
Description

project_id*

string

ID of the project in which you want to create the job

Headers

Name
Type
Description

x-api-key*

string

API key for authentication

Request Body

Name
Type
Description

batch_id*

string

A batch is a way to organise multiple jobs under one batch_id. You can create new batches from the dashboard or by using the batch creation API. If batch_id is left empty or the key is not present, the job is created in the Default batch in your project.

data*

object

The data object contains all the information and attachments required to label a job. The data object is defined below

work_flow_id*

string

The ID of the workflow inside which you want to create the job

reference_id*

string

The unique identifier of the job

{
  "data": {
    "job_id": UUID,
    "reference_id": "001",
    "work_flow_id": UUID
  },
  "success": true
}

Payload

{
    "reference_id": "001",
    "data": {
        "video_data": {
            "frames": [
                {
                    "frame_id": "frame1",
                    "src": "https://s3.aws.com/600x400/000/fff.jpg&text=Dummy+Image+1"
                },
                {
                    "frame_id": "frame2",
                    "src": "https://s3.aws.com/600x400/000/fff.jpg&text=Dummy+Image+2"
                }
            ]
        },
        "reference_data": {
            "raster": {
                "images": [
                    {
                        "frame_id": "frame1",
                        "data": [
                            {
                                "label": "camera 1",
                                "image_url": "https://s3.aws.com/600x400/000/fff.jpg&text=Dummy+Image+1"
                            },
                            {
                                "label": "camera 2",
                                "image_url": "https://s3.aws.com/600x400/000/fff.jpg&text=Dummy+Image+1"
                            }
                        ]
                    },
                    {
                        "frame_id": "frame2",
                        "data": [
                            {
                                "label": "camera 1",
                                "image_url": "https://s3.aws.com/600x400/000/fff.jpg&text=Dummy+Image+1"
                            },
                            {
                                "label": "camera 2",
                                "image_url": "https://s3.aws.com/600x400/000/fff.jpg&text=Dummy+Image+1"
                            }
                        ]
                    }
                ]
            }
        }
    },
    "work_flow_id": <UUID>,
    "batch_id": <UUID>
}

Payload Definition

Key
Type
Description

data.video_data.frames

array

This contains an array of objects, with each object containing two properties: frame_id - Unique identifier for the frame src - URL of the image

data.reference_data

Object

The reference_data object contains an additional list of images that can be used as a reference while annotating the primary image.

This is an optional key based on your requirement.

data.reference_data.raster.images is an array of objects, each containing two properties: frame_id and data.

frame_id is a unique identifier for the frame, which will be used to map reference image(s) with the main image.

Each element of the data array contains two properties: label and image_url.

image_url - URL of the image

label- Name of the image.

Last updated