Create a job

post
A JOB

https://api.playment.io/v1/projects/:project_id/jobs
This endpoint allows you to create a job
Request
Response
Request
Path Parameters
project_id
required
string
ID of the project in which you want to create the job
Headers
x-api-key
required
string
API key for authentication
Body Parameters
batch_id
optional
string
A batch is a way to organize 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.
work_flow_id
required
string
The ID of the workflow inside which you want to create the job
data
required
object
The data object contains all the information and attachments required to label a job. The data object is defined below
reference_id
required
string
Your unique identifier for the job. We suggest you use a UUID or incremental counter such that each job has a unique reference_id
Response
200: OK
Job successfully created
{
"data": {
"job_id": "3f3e8675-ca69-46d7-aa34-96f90fcbb732",
"reference_id": "001",
"work_flow_id": "2aae1234-acac-1234-eeff-12a22a237bbc"
},
"success": true
}
400: Bad Request
{
"error": {
"code": "FS_0003",
"message": "Invalid data passed",
"errors": [
{
"validation_code": "MANDATORY_FIELD_EMPTY",
"meta_data": {
"fields": [
"sensor_data"
]
}
}
]
},
"success": false
}

After creating the job, please store the job_id received in the response. You'll use this job_id to get the annotations later.

Body Parameters

Project ID

After opening a project, You can find the project_id in the information tooltip or URL.

Workflow ID

Batch ID

In the Batches section of a project, You can find the batch_id in the batch information tooltip.

Payload

The payload data structure varies depending on the type of task

Image Annotation & Image Segmentation

{
"reference_id":"001",
"data":{
"image_url":"https://s3.aws.com/600x400/000/fff.jpg"
},
"work_flow_id":"2aae1234-acac-1234-eeff-12a22a237bbc"
}

Video Annotation

{
"reference_id":"001",
"data":{
"video_data": {
"frames": [
{
"frame_id": "frame001",
"src": "https://dummyimage.com/600x400/000/fff.jpg"
},
{
"frame_id": "frame002",
"src": "https://dummyimage.com/600x400/000/fff.jpg"
},
{
"frame_id": "frame003",
"src": "https://dummyimage.com/600x400/000/fff.jpg"
},
{
"frame_id": "frame004",
"src": "https://dummyimage.com/600x400/000/fff.jpg"
},
{
"frame_id": "frame005",
"src": "https://dummyimage.com/600x400/000/fff.jpg"
}
]
}
},
"work_flow_id":"2aae1234-acac-1234-eeff-12a22a237bbc"
}

Attachment Access

The attachments you pass in the job creation requests ultimately need to be made available to the annotators who make the annotations in GT Studio. Depending on the type of workforce and whether you agree to give Playment access to your data, there are a couple of methods through which you can provide access to these attachments:

Workforce Type

Playment can access?

Method

Managed by Playment

Yes

Secure Access

Not managed by Playment

Yes

Secure Access

Not managed by Playment

No

Hybrid Cloud

Errors

For details on possible errors, please follow this link: