1. Home Page
  2. Step 3: Test APIs

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.

  1. Select API Testing > General Protocol > Transmit Device ISAPI > Transmit ISAPI.
  2. 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.

  3. Get the information of the face picture library such as FDID.
    1. Set the request method to Get.
    2. Replace <ISAPIURI> with /ISAPI/Intelligent/FDLib.
    3. Optional: Set the timeout.
    4. select Send Request.
  4. 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.
    1. Select Video Protocol > Device Operation > Add Face Picture.
    2. Enter FDID you get in the step 3.
    3. Upload a face picture as an attachment.
    4. 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.

  1. Select API Testing > General Protocol > Video and Audio > Start Live View.
  2. Click Select to select an access control device supporting live view.

    The <uuid> in the request URL will be automatically replaced.

  3. Optional: To capture pictures on ISUP2.0 devices, go to Configuration > System Settings, and enable Alarm Forwarding.
  4. Set the request parameters, and then select Send Request > Start Live View.
    Figure 2 Start Live View
  5. 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

  1. Select API Testing > Video Protocol > Video and Audio > Start Playback.
  2. Click Select to select a device supporting playback.
  3. Set the start time and end time in the Request Parameters.
  4. Set the request parameters, and then select Send Request > Start Playback.
    Figure 3 Test Video Playback
  5. 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.

  1. Set HTTPS.
    1. Set the HTTPS certificate. For details, see Set HTTPS.
    2. Go to Configuration > Network Settings > Port > Gateway Access Port to check if the HTTPS port is in the normal status.
    3. Log in to the Device Gateway by entering the HTTPS URL.
  2. Test the two-way audio.
    1. Select API Testing > Video Protocol > Video and Audio > Get a Two-Way Audio Channel.
    2. Click Select to select a device supporting two-way audio.
    3. Set the request parameters, and then select Send Request > Start/Stop Two-Way Audio.
On This Page
  • Test Transmitting Device ISAPI
  • Test General Protocol
  • Test Video Protocol
  • Test Video Playback
  • Test Two-Way Audio