/info/get_session

Description

Retrieve the status and possibly also the result of a session.
  • Possible statuses are: INQUEUE, SUCC, and FAILED
  • If the status is SUCC, the session result would also be included.
Session will expired after 72 hours
"status=SUCC" only means that the result is available, please check the content of result to determine whether the request is completed successfully.

Parameter

Name Description
Required api_key Your registered API Key
api_secret Your registered API Secret
session_id The session id, returned by /detection and /recognition APIs.

Return Values

Field Type Description
session_id string Id of the session
create_time int Start timestamp of the task in second
finish_time int End timestamp of the task in second
result object Result of the session
status string Value can be SUCC / FAILED / INQUEUE

Parameter

https://apius.faceplusplus.com/v2/info/get_session?api_secret=YOUR_API_SECRET&api_key=YOUR_API_KEY&session_id=0a3985c6422aa7044379482da312a3ae

JSON Response

{
    "create_time": 1364542970, 
    "finish_time": 1364542970, 
    "result": {
        "url": "http://faceplusplus.com/static/img/demo/6.jpg", 
        "img_id": "2ef94cb9c4bcb28937014b8812cf0754", 
        "img_height": 335, 
        "img_width": 300, 
        "face": [
            {
                "eye_left": {
                    "y": 30.746269, 
                    "x": 47.333333
                }, 
                "center": {
                    "y": 38.507463, 
                    "x": 53.333333
                }, 
                "width": 33.666667, 
                "attribute": {
                    "gender": {
                        "confidence": 71.690933, 
                        "value": "Male"
                    }, 
                    "age": {
                        "range": 7, 
                        "value": 40
                    }, 
                    "race": {
                        "confidence": 99.484747, 
                        "value": "Asian"
                    }
                }, 
                "mouth_left": {
                    "y": 46.567164, 
                    "x": 46.0
                }, 
                "height": 30.149254, 
                "mouth_right": {
                    "y": 47.462687, 
                    "x": 65.0
                }, 
                "face_id": "c157d1af908014ed280d8d8f57affddb", 
                "eye_right": {
                    "y": 30.149254, 
                    "x": 63.666667
                }
            }
        ]
    }, 
    "session_id": "0a3985c6422aa7044379482da312a3ae", 
    "status": "SUCC"
}

Error Code List

Error Code HTTP Status Code Error Message
1001 500 INTERNAL_ERROR
1003 403 AUTHORIZATION_ERROR
1003 403 INSUFFICIENT_PRIVILEGE_OR_QUOTA_LIMIT_EXCEEDED
1004 400 MISSING_ARGUMENTS
1005 400 INVALID_ARGUMENTS
1006 403 ILLEGAL_USE_OF_DEMO_KEY
1202 502 SERVER_TOO_BUSY
Google+