Table of Contents

Existing similar target image | POST /similar

Check if there are already images similar to the target image in the gallery. It is recommended to use this interface before creating a new target.

Action

POST /similar

Authentication

Required

Http header

Content-Type=application/json

HTTP Header: Authorization (when using API Key Token for authentication)

Request parameters

Field Type Required Description
image String(base64) Yes The base64-encoded string of the image content, supporting JPG and PNG format images.

Return fields

Field Description
statusCode Status code 0 indicates correct authentication. For more details, refer to Status Codes
result Error message or result: an array of multiple similar target images. If the result is an empty array, it means no similar images exist.
timestamp The server-side time when the response is returned. Uses Unix timestamp format in milliseconds.

Error codes

See Status Codes and Error Codes

Request example

    POST /similar/ HTTP/1.1  
    Host:  
    Date: Mon, 1 Jan 2018 00:00:00 GMT  
    Content-Type: application/json  
    {  
        "image":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgM...",  
        "timestamp": 1514736000000,  
        "appKey": "test_app_key",  
        "signature": "89985e2420899196db5bdf16b3c2ed0922c0c221"  
    }  

Response example

    HTTP/1.1 200 OK  
    Content-Type: application/json  
    {  
        "statusCode": 0,  
        "result": {  
            "date": "2016-06-15T09:58:51.000Z",  
            "results":[  
                {  
                    "targetId":"e61db301-e80f-4025-b822-9a00eb48d8d2",  
                    "trackingImage":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgM...",  
                    "name": "easyar",  
                    "size": "5",  
                    "meta": "496fbbabc2b38ecs3460a...",  
                    "type": "ImageTarget",  
                    "date": "2016-06-15T09:56:30.000Z",  
                    "active":"1",  
                    "trackableRate": 0,  
                    "detectableRate": 0,  
                    "detectableDistinctiveness": 0,  
                    "detectableFeatureCount": 0,  
                    "trackableDistinctiveness": 0,  
                    "trackableFeatureCount": 0,  
                    "trackableFeatureDistribution": 0,  
                    "trackablePatchContrast": 0,  
                    "trackablePatchAmbiguity": 0  
                }  
            ]  
        },  
        "timestamp": 1514736000000,  
    }