API Documentation Version 1.2

API Reference

Quick search

The Result API

The URL pattern to retrieve the labels is:

http://api.iqengines.com/v1.2/result/

The Result API relies on http POST.

Request parameters

required

api_key:Your API key.
api_sig:The signature of the API call, see Authentication.
qid:The unique identifier of the image for which you want to retrieve the results.
time_stamp:The time stamp for your request. The formatting is ‘YYYYmmDDHHMMSS’ (e.g. ‘20100405224038’), and the standard is UTC time.

optional

json:If this parameter is not empty, the results are in the JSON format, otherwise the results are in the XML format.

Sample request

Sample POST request using cURL:

curl -d "qid=QID&api_key=API_KEY&api_sig=API_SIG&time_stamp=20090612111832" \
 http://api.iqengines.com/v1.2/result/

Return values

A successful request to the Result API will result in a response of the following format:

{
    'data': {
        'error': 0,
        'results': {
            'color': 'Mostly red gray.',
            'labels': 'Diet Coke',
        }
    }
}

If the you passed an extra parameter in your Query API request, and the image is matched against the IQ Engines image database, then we also return the extra parameter along with the bbox, obj_id, and meta parameters:

{
    'data': {
        'error': 0,
        'extra': '"hello world"',
        'results': {
            'bbox': [0, 2, 315, 209],
            'color': 'Mostly yellow blue.',
            'labels': 'Orangina',
            'meta': {},
            'obj_id': 'OBJ_ID'
        }
    }
}

If you have passed the multiple_results parameter in your Query API request and your image is matched to several objects as in the scenario described in the context of webhook results, the results field becomes a list:

{
    'data': {
        'error': 0,
        'results': [
            {
                'bbox': [11, 9, 185, 234],
                'color': 'Mostly red gray, with some yellow.',
                'labels': 'Diet Coke',
                'meta': {},
                'obj_id': 'OBJ_ID1'
            },
            {
                'bbox': [34, 10, 162, 221],
                'color': 'Mostly red gray, with some yellow.',
                'labels': 'Orangina',
                'meta': {},
                'obj_id': 'OBJ_ID2'
            }
        ]
    }
}

If you call the result API and the labels haven’t been computed yet, the response will be:

{
    'data': {
        'comment': 'The results for qid QID are not available yet',
        'error': 0
    }
}