POST /predict-api/api/classification

As of Versionproduct version 2022 Winter
Request MethodPOST
Response FormatJSON
Description

Retrieves classification predictions for multiple objects identified by their objectId specified in the JSON request body.

The endpoint will return a JSON structure containing a list of predictions, one for each objectId. Each individual prediction sub-structure is structured as already described for the endpoint GET /predict-api/api/classification/{objectId}.

Request Header

Content-Type: application/json

X-ID-TENANT-NAME: tenant_name

Request Example
/predict-api/api/classification
{
    "objects": [{
        "properties": {
            "system:objectId": {
                "value": "da20c2fb-8071-45e9-b4bf-2af376cdf9b6"
            }
        }
    },
    {
        "properties": {
            "system:objectId": {
                "value": "r6s5c2fb-1234-88e9-b4bf-2af376cdf7y7"
            }
        }
    }]
}

Result Example


{
    "predictions": [{
        "properties": {
            "Class1": {
                "probability": 98.45
            },
            "Class2": {
                "probability": 12.77
            },
            "Class3": {
                "probability": 1.38
            },
            "Class4": {
                "probability": 0.99
            },
            "Class5": {
                "probability": 0.02
            }
        },
        "system:objectId": "da20c2fb-8071-45e9-b4bf-2af376cdf9b6",
        "predictionId": 165
    },
    {
        "properties": {
            "Class1": {
                "probability": 81.23
            },
            "Class2": {
                "probability": 10.42
            },
            "Class3": {
                "probability": 2.97
            },
            "Class4": {
                "probability": 0.86
            },
            "Class5": {
                "probability": 0.01
            }
        },
        "system:objectId": "r6s5c2fb-1234-88e9-b4bf-2af376cdf7y7",
        "predictionId": 166
    }]
}