Step 3: Test APIs
After adding devices, you can select a device to test the available APIs
such as adding face pictures and starting live view of access control devices. This topic
will guide you through testing the API of adding face pictures to the face picture library,
the API of starting live view, the API of starting playback, and the API of starting the
two-way audio.
Test Transmitting Device ISAPI
This section will introduce how to add face pictures to the face picture
library.
-
Select .
-
Click Select to select a encoding device supported
adding face pictures. You can select a device by the device ID and device
name.
After you selecting a device, <uuid> in the
request URL will be automatically filled.
-
Get the information of the face picture library such as
FDID.
-
Set the request method to Get.
-
Replace <ISAPIURI> with
/ISAPI/Intelligent/FDLib.
- Optional:
Set the timeout.
-
select Send Request.
-
After you get the information, upload face pictures to the library, call
/ISAPI/Intelligent/FDLib/pictureUpload?format=json to upload
face pictures to the library.
-
Select .
-
Enter FDID you get in the step 3.
-
Upload a face picture as an attachment.
-
Select Send Request.
Note
The following GIF (The PDF version is not supported)
will help you visualize the testing process.
Figure 1 Add Face
Pictures to Library
Test General Protocol
This section will introduce how to test the API of starting the live view of
encoding devices and access control devices. You can only preview videos under
1080p resolution on the Firefox, Chrome, or Edge browser. Only G.711 a-law,
G.711 u-law, and ACC codecs are supported on the web page.
-
Select .
-
Click Select to select an access control device
supporting live view.
The <uuid> in the request URL will be automatically replaced.
- Optional:
To capture pictures on ISUP2.0 devices, go to , and enable Alarm Forwarding.
-
Set the request parameters, and then select .
Figure 2 Start Live View
- Optional:
Perform the following operations as needed.
Operation
|
Description
|
Start/Pause Live View
|
Click / to
start or pause live view.
|
Start/Stop Recording
|
Click / to
start or stop recording.
Note
This function is not supported on Firefox.
|
Audio On/Off
|
Click / to
turn the audio on or off.
|
Capture Picture (BMP)
|
Click to
capture a picture in BMP.
|
Capture Picture (JPEG)
|
Click to
capture a picture in JPEG.
|
Test Video Protocol
This section will introduce how to test the API of starting the playback and
two-way audio. You can only play back videos under 1080p resolution on the
Firefox, Chrome, or Edge browser. Only G.711 a-law, G.711 u-law, and ACC codecs
are supported on the web page.
Test Video Playback
-
Select .
-
Click Select to select a device supporting
playback.
-
Set the start time and end time in the Request Parameters.
-
Set the request parameters, and then select .
Figure 3 Test Video Playback
-
Perform the following operations as needed.
Operation
|
Description
|
Start/Pause Playback
|
Click / to
start or pause playback.
|
Start/Stop Recording
|
Click / to
start or stop recording.
Note
This function is not supported on Firefox.
|
Fast/Slow Forward
|
Click / to
play the recorded video slower or faster.
|
Audio On/Off
|
Click / to
turn the audio on or off.
|
Select Video
|
Click in the
upper-right corner of the playback page, and
select a video to play it. By default, the first
video within the set time period will be
automatically played.
|
Test Two-Way Audio
You can test the two-way audio only when you log in to the Device Gateway via
HTTPS.
-
Set HTTPS.
-
Set the HTTPS certificate. For details, see Set HTTPS.
-
Go to to check if the HTTPS port is in the normal
status.
-
Log in to the Device Gateway by entering the HTTPS URL.
-
Test the two-way audio.
-
Select .
-
Click Select to select a device
supporting two-way audio.
-
Set the request parameters, and then select .