Retrieve results from a feature extraction job on images.
Note that since files are split up into batches and processed independently of each other, the items in successfully completed batches will be returned even if files in other batches are still being processed. The job status will be Running
until all batches have been processed. If one of the items in a batch fails, the results from items in other completed batches will still be returned. The corresponding items and error message(s) of failed batches will be populated in failedItems
.
Additionally, the status of the job is set to Completed
if at least one batch is successfully completed, otherwise the status is set to Failed
.
Success
The response for a failed request.
const { items } = await client.vision.getExtractJob(12345678, true); // get an existing job, wait for it to complete, and get the results items.forEach((item) => { const predictions = item.predictions // do something with the predictions });
{- "status": "Queued",
- "createdTime": 1730204346000,
- "startTime": 1730204346000,
- "statusTime": 1730204346000,
- "errorMessage": null,
- "jobId": 123,
- "items": [
- {
- "fileId": 1234,
- "fileExternalId": "1234",
- "predictions": {
- "textPredictions": [
- {
- "confidence": 0.9,
- "text": "string",
- "textRegion": {
- "xMin": 0.5,
- "xMax": 0.9,
- "yMin": 0.5,
- "yMax": 0.9
}
}
], - "assetTagPredictions": [
- {
- "confidence": 0.9,
- "assetRef": {
- "id": 1233
}, - "text": "string",
- "textRegion": {
- "xMin": 0.5,
- "xMax": 0.9,
- "yMin": 0.5,
- "yMax": 0.9
}
}
], - "peoplePredictions": [
- {
- "label": "person",
- "confidence": 0.8,
- "boundingBox": {
- "xMin": 0.5,
- "xMax": 0.9,
- "yMin": 0.5,
- "yMax": 0.9
}
}
]
}
}
], - "failedItems": [
- {
- "errorMessage": "string",
- "items": [
- {
- "fileId": 1234,
- "fileExternalId": "1234",
- "fileInstanceId": {
- "space": "space",
- "externalId": "externalId"
}
}
]
}
], - "parameters": {
- "textDetectionParameters": {
- "threshold": 0.8
}, - "assetTagDetectionParameters": {
- "threshold": 0.8,
- "partialMatch": true,
- "assetSubtreeIds": [
- 1,
- 2
]
}, - "peopleDetectionParameters": {
- "threshold": 0.8
}
}
}