Create and List Annotation Jobs

You can use the jobs endpoint to get info about your annotation jobs, their current status or assign images for labeling by creating a new Annotation Job with images from one of your batches.

Create a New Annotation Job

To create an annotation job, you will need an upload batch that you would like to assign to a labeler and a reviewer:

import roboflow

rf = roboflow.Roboflow(api_key=ROBOFLOW_API_KEY)

project = rf.workspace().project(PROJECT_ID)

job = project.create_annotation_job(
    name="Test Annotation Job",
    batch_id=UPLOAD_BATCH_ID,
    num_images=UPLOAD_BATCH_SIZE,
    labeler_email="[email protected]",
    reviewer_email="[email protected]",
)

Retrieve Annotation Job Data from the API

To retrieve annotation job data from the REST API, make a request to the following endpoint:

curl https://api.roboflow.com/${WORKSPACE}/${PROJECT}/jobs?api_key=${ROBOFLOW_API_KEY}

This will return data in the following format:

{
    "jobs": [
        {
            "owner": "holeSv3hwbzrOv37vH5b",
            "approved": 0,
            "createdBy": "g12lCVib0pgurZ6EqWLnApJJ4gr1",
            "sourceBatch": "PBDhem3YRI1rKtQZSqRK/6VN0fFQIWU1E24bDjGsN",
            "annotated": 3,
            "rejected": 0,
            "labeler": "[email protected]",
            "numImages": 26,
            "status": "assigned",
            "instructionsText": "",
            "name": "Uploaded on 11/22/22 at 1:39 pm: Job 9",
            "reviewer": "[email protected]",
            "created": {
                "_seconds": 1669148088,
                "_nanoseconds": 297000000
            },
            "project": "PBDhem3YRI1rKtQZSqRK",
            "unannotated": 23,
            "id": "5LfYNJg10Z9Kvx5Tt5Uq"
        },

        {
            "approved": 0,
            "unannotated": 2,
            "instructionsText": "Please label all the racoons in the images using polygons",
            "annotated": 12,
            "sourceBatch": "PBDhem3YRI1rKtQZSqRK/6VN0fFQIWU1E24bDjGsN",
            "project": "PBDhem3YRI1rKtQZSqRK",
            "rejected": 0,
            "owner": "holeSv3hwbzrOv37vH5b",
            "createdBy": "API",
            "status": "assigned",
            "created": {
                "_seconds": 1669148192,
                "_nanoseconds": 651000000
            },
            "labeler": "[email protected]",
            "name": "Test Job",
            "numImages": 25,
            "reviewer": "[email protected]",
            "id": "h2E42jt686yLyMIxxqOQ"
        }
    ]
}

To retrieve information about a specific job, specify the job ID:

curl https://api.roboflow.com/${WORKSPACE}/${PROJECT}/jobs/${JOB_ID}?api_key=${ROBOFLOW_API_KEY}

Here is the response format from this request:

{
    "approved": 0,
    "unannotated": 2,
    "instructionsText": "Please label all the racoons in the images using polygons",
    "annotated": 12,
    "sourceBatch": "PBDhem3YRI1rKtQZSqRK/6VN0fFQIWU1E24bDjGsN",
    "project": "PBDhem3YRI1rKtQZSqRK",
    "rejected": 0,
    "owner": "holeSv3hwbzrOv37vH5b",
    "createdBy": "API",
    "status": "assigned",
    "created": {
        "_seconds": 1669148192,
        "_nanoseconds": 651000000
    },
    "labeler": "[email protected]",
    "name": "Test Job",
    "numImages": 25,
    "reviewer": "[email protected]",
    "id": "<JOB_ID>"
}

Was this helpful?