Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

How to get total recording size and recording days of each device

Answered

Comments

3 comments

  • Official comment
    Sergey Yuldashev
    • Network Optix team

    Hello HaoYuTek,

    In order to retrieve information about the existing footage for each device, please refer to this api method:

    https://meta.nxvms.com/doc/developers/api-tool/rest-v3-devices-id-footage-get

    It returns the array of dictionaries, each represents the archive video chunk with the attributes as below:

    • serverId - id value of the server from this system/site, might be different if there is more than one server consisting a system/site
    • startTimeMs - Start time in milliseconds since epoch
    • durationMs - duration of the video chunk in milliseconds

    In order to get the archive depth one would need to make proper calculations over the above data upon the reception.

    There is a modification for this call that will return information about all the cameras/devices registered:

    https://meta.nxvms.com/doc/developers/api-tool/rest-v3-devices--footage-get

    Please be aware that depending on the recording mode and the storage size, the arrays sizes might be huge.

     

     

  • Sergey Yuldashev
    • Network Optix team

    Sorry, I missed this part:

    The total recording size

    This data will be returned for the below request. Please note that the documentation is misleading right now and will be fixed. It should be sent without the "id" parameter specified which is shown as mandatory in the api doc tool. It's not actually needed and will work as is if you are using curl or any other http client.

    https://meta.nxvms.com/doc/developers/api-tool/rest-v3-servers--recordingstatistics-get
    GET /rest/v3/servers/*/recordingStatistics

    0
  • HaoYuTek

    Hi Sergey, 

    Thank you for the support. You are correct that the archiveDurationS field in the response of GET /rest/v3/servers/*/recordingStatistics represents the recording period in seconds.

    However, I’ve observed that even after stopping the recording, the value of archiveDurationS continues to increase. Is this the expected behavior?

    For example, if I start recording at 11:00 AM and stop it for 10 minutes during the session, at 12:00, the API still returns 3600 seconds instead of 3000 (i.e., it reports 1 hour instead of 50 minutes of actual recording time).

    Could you please clarify how archiveDurationS is calculated in such cases?
    If this is the expected behavior, is there any way that I can get the actural recoridng time?

     

    Bruce

    0

Please sign in to leave a comment.