TCIT Server Responses

State Message Description
1000 STATE_SUCCESSFUL Successful
3000 STATE_FAIL Undefined error
3001 STATE_REQUEST_METHOD_ERROR HTTP Request error
3002 STATE_PARAMETER_ERROR Parameter error
3003 STATE_PROCESS_ERROR API process error

[API] Storage Upload

http://localhost:8800/storage/upload

Description

Upload image to TCIT Local Server

Parameters

"image" - Upload image to TCIT Local Server and get img_id, the unique ID for this image as future reference。

Return Value

"img_id" - Unique ID for the upload image

"state" - Return status

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Upload processing error

JSON Response

{
    "img_id":"ecf726939c4f480c87da93aa432ca2e2",
    "state":1000
}

[API] Face Detection

http://localhost:8800/face/detection/detect

Description

Detect face, estimate age and gender on image (img_id) uploaded to Local Server, and return result。

Parameters

"img_id" - Unique ID for image uploaded to local server。

"track_id" - track_id required to start face tracking mode(option)。

Return Value

"namespace" - Parameter for Web API only

"session_id" - Parameter for Web API only

"face_id" - Unique ID for face detection

"face_track_id" - ID which determine if same person or not when under detection and tracking mode

"featureScore" - feature confidance

"age" - Age estimation, between 1~99

"gender" - Gender, male=1, female=0

"expression" - Facial expression(neutral、happiness、surprise、fear、anger、disgust、sadness total 7 expressions)

"angleLeftRight" - Face right and left angle

"angleRoll" - Face rolling angle

"angleUpDown" - Face up and down angle

"detectPos" - Face area

"points" - Facial feature points, eyes, nose and mouth

"state" - Return status

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Face detection process error

JSON Response

{
    "faces":[
    {
        "age":28,
        "angleLeftRight":1,
        "angleRoll":7,
        "angleUpDown":3,
        "detectPos":[
            [139,383],
            [907,383],
            [907,1151],
            [139,1151]
        ],
        "expression":neutral,
        "face_id":"42780824c8ff4906913c095cbc4941f2",
        "face_track_id":0,
        "featureScore":680,
        "gender":1,
        "points":{
            "leftEye":{"x":-1,"y":-1},
            "mouth":{"x":-1,"y":-1},
            "nose":{"x":-1,"y":-1},
            "rightEye":{"x":-1,"y":-1}
        }
    }
    ],
    "namespace":"default",
    "session_id":"null",
    "state":1000
}

[API] Create Face Tracked Detection

http://localhost:8800/face/detection/trackstart

Description

Start face tracking mode and get track_id for this instance. When using face detection API, this track_id is required to determine if same person or not. Recommend for streaming not for single image

Parameters

Return Value

"track_id" - Start tracking mode and get track_id (limited to 5).

"state" -

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_PROCESS_ERROR track_id process error

JSON Response

{
    "state":1000,
    "track_id":"71de818b89574a9595635272be4f52aa"
}

[API] Delete Face Tracked Detection

http://localhost:8800/face/detection/trackend

Description

track_id for this instance

Parameters

"track_id" - ID generated when start tracking mode

Return Value

"state" - Return status

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in deleting track_id

JSON Response

{
    "state":1000
}

[API] Face Comparison

http://localhost:8800/face/detection/compare

Description

Compare similarity of two faces (two face_id) which are uploaded to local server

Parameters

"face_id1" - face_id of person 1

"face_id2" - face_id of person 2

Return Value

"namespace" - Parameter for Web API only

"session_id" - Parameter for Web API only

"similarity" - Similarity of two face_id

"state" - Return status

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Comparison process error

JSON Response

{
    "namespace":"default",
    "session_id":"null",
    "similarity":972,
    "state":1000
}

[API] Create Person

http://localhost:8800/face/person/create

Description

Create a person and get a person_id, including face (face_id) and group (group_id). A person can have more than one face_id and group_id

Parameters

"face_id" - Face (face_id) of created person, can have more than one and separate by comma

"group_id" - Group (group_id) of created person, can have more than one and separate by comma

Return Value

"namespace" - Parameter for Web API only.

"added_face_count" - Successfully add requested numbers of faces(face_id) to his person_id

"added_group_count" - Successfully add his person_id to requested numbers of group (group_id)

"person_id" - ID representing this person

"state" - Return status

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in creating person_id

JSON Response

{
    "namespace":"default",
    "added_face_count":1,
    "added_group_count":0,
    "person_id":"549815412873ba1170394bcc",
    "state":1000
}

[API] Delete Person

http://localhost:8800/face/person/delete

Description

Delete person (person_id) information from Local API Server

Parameters

"person_id" - Person (person_id) to be deleted, can delete more than one and separate by comma

Return Value

"namespace" - Parameter for Web API only

"delete_count" - Successfully delete requested numbers of persons (person_id)

"state" - Return status

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in deleting person_id

JSON Response

{
    "namespace":"default",
    "delete_count":1,
    "state":1000
}

[API] Add Face to Person

http://localhost:8800/face/person/update/add

Description

Add face (face_id) to person (person_id), more than one faces (face_id) can be added.

Parameters

"person_id" - Person (person_id) of faces to be added

"face_id" - Face (face_id) to be added, more than one can be added and separate by comma.

Return Value

"namespace" - Parameter for Web API only.

"added_face_count" - Successfully add required number of faces (face_id) to person (person_id).

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in adding face_id to person_id

JSON Response

{
    "added_face_count":1,
    "namespace":"default",
    "state":1000
}

[API] Remove Face from Person

http://localhost:8800/face/person/update/remove

Description

Delete face (face_id) of person (person_id), more than one faces (face_id) can be deleted.

Parameters

"person_id" - Person (person_id) of faces to be deleted.

"face_id" - Face (face_id) to be deleted, more than one can be deleted and separate by comma.

Return Value

"namespace" - Parameter for Web API only

"removed_face_count" - Successfully delete required number of faces (face_id).

"state" - Return status

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in deleting face_id from person_id.

JSON Response

{
    "removed_face_count":1,
    "namespace":"default",
    "state":1000
}

[API] Get Person Information

http://localhost:8800/face/person/info/get

Description

Get person (person_id) information, including face (face_id) and group (group_id).

Parameters

"person_id" - Person (person_id) of information required.

Return Value

"namespace" - Parameter for Web API only.

"faces" - Information on face (face_id) of the person (person_id).

"groups" - Information on group (group_id) of the person (person_id).

"person_id" - Person (person_id) of this information.

"state" - Return status

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error

JSON Response

{
    "faces":[2219a13f5id892219025q5d8],
    "groups":[],
    "person_id":"549815412873ba1170394bcc",
    "namespace":"default",
    "state":1000
}

[API] Query Person List

http://localhost:8800/face/query/person_list

Description

Get all Persons (person_id) in database.

Parameters

Return Value

"namespace" - Parameter for Web API only.

"persons" - List of Persons (person_id) in database.

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in getting all persons information.

JSON Response

{
    "namespace":"default",
    "persons":["54aca13f559ad2219025a5a8","54aca3fe559ad2219025a5a9"],
    "state":1000
}

[API] Person Verify

http://localhost:8800/face/person/verify

Description

Compare similarity of face (face_id) and person (person_id).

Parameters

"person_id" - Person (person_id) for comparison.

"face_id" - Face (face_id) for comparison.

Return Value

"namespace" - Parameter for Web API only.

"session_id" - Parameter for Web API only.

"confidence" - Face (face_id) and person (person_id) similarity score.

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in face and person comparison.

JSON Response

{
    "namespace":"default",
    "session_id":"default",
    "confidence":589,
    "state":1000
}

[API] Image Person Verify

http://localhost:8800/face/person/image/verify

Description

上傳圖片與人員person_id列表比對,得到相似程度

Parameters

"image" - 上傳欲比對的圖片

"person_id" - 欲比對的人員列表,用逗點隔開,可一次比對多個

Return Value

"featureScore" - 人臉特徵信心值

"age" - 預估年齡,範圍介於1~99之間

"gender" - 預估性別,男生為1,女生為0

"expression" - 預估表情(neutral、happiness、surprise、fear、anger、disgust、sadness共7種)

"angleLeftRight" - 預估人臉左右角度

"angleRoll" - 預估人臉旋轉角度

"angleUpDown" - 預估人臉上下角度

"detectPos" - 人臉於影像中的區域

"points" - 人臉特徵位置,兩眼、鼻子及嘴巴位置

"persons" - 相似人員列表

"person_id" - 相似人員 person_id

"similarity" - 相似度

"state" - 回傳狀態

  • STATE_SUCCESSFUL 執行成功
  • STATE_FAIL 尚未分類的錯誤
  • STATE_REQUEST_METHOD_ERROR Request方式不是使用POST
  • STATE_PARAMETER_ERROR Request少給參數或給錯參數
  • STATE_PROCESS_ERROR 人臉偵測錯誤

JSON Response

{
    "faces":[
    {
        "age":28,
        "angleLeftRight":1,
        "angleRoll":7,
        "angleUpDown":3,
        "detectPos":[
            [139,383],
            [907,383],
            [907,1151],
            [139,1151]
        ],
        "expression":neutral,
        "featureScore":680,
        "gender":1,
        "points":{
            "leftEye":{"x":-1,"y":-1},
            "mouth":{"x":-1,"y":-1},
            "nose":{"x":-1,"y":-1},
            "rightEye":{"x":-1,"y":-1}
        },
        "persons":[
        {
            "person_id":"54cf41e30441ae19cc756ecd",
            "similarity":700
        }
        ]
    }
    ],
    "state":1000
}

[API] Create Group

http://localhost:8800/face/group/create

Description

Create group and get (group_id), including person (person_id). A group can have more than one (person_id).

Parameters

"person_id" - Person (person_id) to be added to group, more than one can be added and separate by comma.

Return Value

"namespace" - Parameter for Web API only.

"added_person_count" - Successfully add required number of persons (person_id) to group (group_id).

"group_id" - Get (group_id) for this group.

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in creating group.

JSON Response

{
    "added_person_count":1,
    "group_id":"549aa998a7a57d145ce67609",
    "namespace":"default",
    "state":1000
}

[API] Delete Group

http://localhost:8800/face/group/delete

Description

Delete group (group_id) from Local API Server.

Parameters

"group_id" - Group (group_id) to be deleted, more than one can be deleted and separate by comma.

Return Value

"namespace" - Parameter for Web API only.

"delete_count" - Successfully delete required number of groups (group_id).

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in deleting group.

JSON Response

{
    "namespace":"default",
    "delete_count":1,
    "state":1000
}

[API] Add Person to Group

http://localhost:8800/face/group/update/add

Description

Add person (person_id) to group (group_id), more than one person (person_id) can be added.

Parameters

"group_id" - Group (group_id) of persons to be added.

"person_id" - Person (person_id) to be added to the group, more than one can be added and separate by comma.

Return Value

"namespace" - Parameter for Web API only.

"added_person_count" - Successfully add required number of persons (person_id) to group (group_id).

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in adding person to group.

JSON Response

{
    "added_person_count":1,
    "namespace":"default",
    "state":1000
}

[API] Remove Person from Group

http://localhost:8800/face/group/update/remove

Description

Delete person (person_id) from group (group_id), more than one person (person_id) can be deleted.

Parameters

"group_id" - Group (group_id) of persons to be deleted.

"person_id" - Person (person_id) to be deleted from the group, more than one can be deleted and separate by comma.

Return Value

"namespace" - Parameter for Web API only.

"removed_person_count" - Successfully delete required number of persons (person_id).

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in deleting person from group

JSON Response

{
    "removed_person_count":1,
    "namespace":"default",
    "state":1000
}

[API] Get Group Information

http://localhost:8800/face/group/info/get

Description

Get group (group_id) information, including persons (person_id) in this group.

Parameters

"group_id" - Group (group_id) of information required.

Return Value

"namespace" - Parameter for Web API only.

"persons" - Information of person (person_id) in this group (group_id).

"group_id" - Group (group_id) of this information.

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error

JSON Response

{
    "group_id":"54c09970984cd31cd44ff91f",
    "namespace":"default",
    "persons":[
                {"person_id":"54c0997d984cd31cd44ff920"},
                {"person_id":"54c0a40c984cd31cd44ff922"}],
    "state":1000
}

[API] Query Group List

http://localhost:8800/face/query/group_list

Description

Get all groups (person_id) in database.

Parameters

Return Value

"namespace" - Parameter for Web API only.

"groups" - List of groups (group_id) in database.

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in getting all group information.

JSON Response

{
    "namespace":"default",
    "groups":["54aca13f559ad2219025a5a8","54aca3fe559ad2219025a5a9"],
    "state":1000
}

[API] Group Identify

http://localhost:8800/face/group/identify

Description

Compare similarity of person (person_id) and persons in group (group_id).

Parameters

"face_id" - Person (person_id) for comparison.

"group_id" - Group (group_id) for comparison.

Return Value

"namespace" - Parameter for Web API only.

"session_id" - Parameter for Web API only.

"similarity" - Person (person_id) and a person (person_id) in the group similarity score.

"person_id" - Person (person_id) in the group.

"persons" - Compare with all persons in the group.

"state" - Return status.

  • STATE_SUCCESSFUL Successful
  • STATE_FAIL Undefined error
  • STATE_REQUEST_METHOD_ERROR Request method is not POST or GET
  • STATE_PARAMETER_ERROR Request parameter error
  • STATE_PROCESS_ERROR Error in comparing person and group.

JSON Response

{
    "namespace":"default",
    "persons":[{
        "person_id":"54cf41e30441ae19cc756ecd",
        "similarity":619}],
    "session_id":"",
    "state":1000
}

[API] Human Detection

http://localhost:8800/human/detection/detect

Description

Upload the image of recognized result from Local API and send back the result. Parameters

"img_id" - Upload the image to local server and obtain the image with ID.

"track_id" - Activate the face tracking mode with ID

Return Value

"namespace" - Not available for Local API Server

"session_id" - Not available for Local API Server

"human_id" - ID for face recognition result

"human_track_id" - Tracking mode with face recognition. Can be recognized to see if it is the same person.

"detectPos" - detect image of people

"state" - report current state

  • STATE_SUCCESSFUL Execute successfully
  • STATE_FAIL Error occurred due to none classification
  • STATE_REQUEST_METHOD_ERROR Not using the post way to request.
  • STATE_PARAMETER_ERROR Wrong parameter of request
  • STATE_PROCESS_ERROR Detecting error

JSON Response

{
    "humans":[
    {
        "angleLeftRight":1,
        "angleRoll":7,
        "detectPos":[
            [139,383],
            [907,383],
            [907,1151],
            [139,1151]
        ],
        "human_id":"42780824c8ff4906913c095cbc4941f2",
        "human_track_id":0
    }
    ],
    "namespace":"default",
    "session_id":"null",
    "state":1000
}

[API] Create Human Tracked Detection

http://localhost:8800/human/detection/trackstart

Description

Activate the face tracking mode and take one set of track_id as instance. Then when you need to identify if the tracking target is the same target, please use this track_id to adjust the detecting API. Not available during the single photo of stream mode.

Parameters

Return Value

"track_id" - Activate the tracking mode, get one set of track_id( max. 5 sets)

"state" - call the current state

  • STATE_SUCCESSFUL execute successful
  • STATE_FAIL Error occurred from no classification
  • STATE_REQUEST_METHOD_ERROR Request way is not using POST
  • STATE_PARAMETER_ERROR Parameter required or wrong parameter
  • STATE_PROCESS_ERROR Error occurred in generating track_id

JSON Response

{
    "state":1000,
    "track_id":"71de818b89574a9595635272be4f52aa"
}

[API] Delete Human Tracked Detection

http://localhost:8800/human/detection/trackend

Description

Delete the instance of this track_id

Parameters

"track_id" - Obtain the ID when opening the tracking mode

Return Value

"state" - call the current status

  • STATE_SUCCESSFUL execute successfully
  • STATE_FAIL Error occurred due to none classification
  • STATE_REQUEST_METHOD_ERROR Request way is not using POST
  • STATE_PARAMETER_ERROR Need more parameter or correct one to request
  • STATE_PROCESS_ERROR Error occurred in deleting track_id

JSON Response

{
    "state":1000
}

[API] Open Channel

http://localhost:8800/channel/open

Description

Open one channel that can command the stream of its channel and related set up.

Parameters

"url" - If you need to open the webcam, please input the local camera/#(0~10); if it is IP cam, please input url.

"settings" - Setting of the stream function(please refer to the below paramter for Json format.)

  • camera.width - The width of the camera image.( The default setting is 640.)

  • camera.height - The height of camera image. The default setting is 480.

  • camera.quality - The image quality from stream. Default setting is 30 (0~100).

  • camera.fps - FPS of the video streaming. Default setting is 10 (0~20).

  • camera.send_image - Send result of the Image. The default setting is true.

  • camera.compress - Compress the image data. Default setting is true.

  • face.detection.enable Face detecting function. Default setting iis true.

  • face.detection.tracking - Face tracking function. Default value is true.

  • face.detection.max_size - The largest face size in recognition.(pixel). Default setting is 8192 (min_size~8192)

  • face.detection.min_size - The min. size of face detection(pixel). Default setting is 40(20~max_size).

  • face.detection.age - Age detection. Default value is true.

  • face.detection.gender - Gender detection. Default value is true.

  • face.detection.express - Detect emotion. Default value is true.

  • face.identification.enable - Activate recognition function. Default setting is false.

  • face.identification.group_id - Give command to group_id if needs to activate the recognition function. Default setting is empty.

  • face.identification.mode - Face recognition mode. 1= Manual mode(recognized every image) ; 2= Auto mode (Automatic filter the best timing for recognition )

  • face.identification.max_result Send back the max. result. Default setting is 3 (1~10)

  • human.detection.enable - Activate the people detection. Default setting is false.

  • human.detection.tracking - Activate the human tracking function. Default setting is true.

  • human.detection.max_size - Max. face size(pixel) for human detection. Default setting is 8192(min_size~8192)

  • human.detection.min_size Min face size(pixel) for human detection. Default setting is 40(20~max_size).

    {
      "camera":
      {
          "width":640,
          "height":480,
          "quality":30,
          "fps":10,
          "send_image":true,
          "compress":true
      },
      "face":
      {
          "detection":
          {
              "enable":true,
              "tracking":true,
              "max_size":8192,
              "min_size":40,
              "age":true,
              "gender":true
              "express":true
          },
          "identification":
          {
              "enable":false,
              "group_id":"GROUPID",
              "mode":2,
              "max_result":3
          }
      }
      "human":
      {
          "detection":
          {
              "enable":false,
              "tracking":true,
              "max_size":8192,
              "min_size":40
          }
      }
    }
    

    Return Value

"channel_id" - The only ID of the streaming line

"state" - State report

  • STATE_SUCCESSFUL Execute channel
  • STATE_FAIL Failed in classify
  • STATE_REQUEST_METHOD_ERROR Not using POST to request. *STATE_PARAMETER_ERROR Need more parameter or wrong parameter
  • STATE_PROCESS_ERROR Failed in setting up the channel

JSON Response

{
    "channel_id":"E4B94195-ACF4-4BC8-9594-EAD5834F3793",
    "state":1000
}

[API] Close Channel

http://localhost:8800/channel/close

Description

Close the channel

Parameters

"channel_id" - To turn off the streaming ID

Return Value

"state" - State report

  • STATE_SUCCESSFUL Execute successfull
  • STATE_FAIL Failed to classify
  • STATE_REQUEST_METHOD_ERROR Request way is not using POST.
  • STATE_PARAMETER_ERROR Request more parameter or wrong parameter
  • STATE_PROCESS_ERROR Error in turning off the channel

JSON Response

{
    "state":1000
}

[API] Get Channel Infomation

http://localhost:8800/channel/info/get

Description

Get channel information

Parameters

"channel_id" To search channel_id, please use comma to divide it. Available to search for multiple ids.

Return Value

"channel_id" - Search streaming ID

"url" - URL of streaming

"connect number" - Numbers of connected web socket

"fps" - Streaming FPS.

"height" - Image height

"width" - Image width

"quality" - Image quality

"state" - Status report

  • STATE_SUCCESSFUL Execute successfully
  • STATE_FAIL Error occurred due to none classification
  • STATE_REQUEST_METHOD_ERROR Not using POST to request
  • STATE_PARAMETER_ERROR Require more parameter or wrong parameter
  • STATE_PROCESS_ERROR Error occurred due to wrong channel information

JSON Response

{
    "channels":[{
        "channel_id":"5B1F6DA0-9C43-42E0-AC56-449E0B4F7807",
        "info":{
            "connect number":0,
            "fps":15,
            "height":480,
            "quality":70,
            "url":"localcamera/0",
            "width":640
        }
    }],
    "state":1000
}

[API] Query Channel List

http://localhost:8800/channel/query/channel_list

Description

Search all the Channel information from Local API Server.

Parameters

Return Value

"channel_id" - Search the channel streaming ID

"url" - Streaming URL

"connect number" - Numbers of connected Web Socket

"fps" - Streaming FPS

"height" - Image height

"width" - Image width

"quality" - Image quality

"state" - Status report

  • STATE_SUCCESSFUL Execute successfully
  • STATE_FAIL Error occurred due to none classification
  • STATE_REQUEST_METHOD_ERROR Not using POST to request
  • STATE_PARAMETER_ERROR Require more parameter or wrong parameter

JSON Response

{
    "channels":[{
        "channel_id":"5B1F6DA0-9C43-42E0-AC56-449E0B4F7807",
        "info":{
            "connect number":0,
            "fps":15,
            "height":480,
            "quality":70,
            "url":"localcamera/0",
            "width":640
        }
    },
    {
        "channel_id":"8BE8D791-DA6F-4E87-848C-0337D55C8925",
        "info":{
            "connect number":1,
            "fps":15,
            "height":1024,
            "quality":50,
            "url":"localcamera/1",
            "width":768
        }
    }],
    "state":1000
}

[API] Get Device Infomation

http://localhost:8800/channel/device/info/get

Description

Get device URL information, includinf resolution...etc.

Parameters

"url" - Search device URL

Return Value

"resolutions" - All resolution of the device URL

"url" - Source URL of the streaming

"state" - Status report

  • STATE_SUCCESSFUL Execute successfully
  • STATE_FAIL Error of none classification
  • STATE_REQUEST_METHOD_ERROR Not using POST to request
  • STATE_PARAMETER_ERROR Require more parameter or wrong parameter
  • STATE_PROCESS_ERROR Error occurred during acquiring video device information

JSON Response

{
    "resolutions":
    [
        [160,120],
        [320,240],
        [640,480],
        [1024,768]
    ],
    "state":1000,
    "url":"localcamera/1"
}

[API] Query Device List

http://localhost:8800/channel/query/device_list

Description

Search all the video device in local server

Parameters

Return Value

"url" - Device streaming URL

"name" - Device name

"state" - Status report

  • STATE_SUCCESSFUL Execute successfully
  • STATE_FAIL Error occurred due to none classification

JSON Response

{
    "devices":
    [{
        "name":"",
        "url":"localcamera/0"
    },
    {
        "name":"",
        "url":"localcamera/1"
    }],
    "state":1000
}

[API] Restart Server

http://localhost:8800/system/restart

Description

Restart Server

Parameters

Return Value

"state" - Status report

JSON Response { "state":1000 }

[WebSocket] Connect WebSocket

ws://localhost:4662

Description

Connect Local API server via Web Socket

[WebSocket] Open Channel with WebSocket

channel_id: XXXXXXXXX

Description

Send channel ID to Local API via Web Socket

results matching ""

    No results matching ""