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

Status Page

Sent name of admin in soft trigger http request

Answered

Comments

3 comments

  • Anderson Chang
    • Network Optix team

    Hi @...,

    I am sorry to tell you that we do not support putting the user name as the variable inside the content of the HTTP request currently.
    For now, the only option is to set the individual event rule and action for different users, which you have already done.

    Just for your reference, if your access control system can send out the HTTP request as well, you can also set it to send the unlocking activity back to Nx Witness, and make the Nx Witness record as the bookmark.

     

    1
  • Permanently deleted user

    Thanks. I can probably look but is it possible to add soft triggers through nxwitness web API? Might make it easier for me to automate the creation of soft triggers this way.

    0
  • Norman
    • Network Optix team

    Hi @...,

    You can do that through the API.

    First you collect the data through the API with the following command:

    https://localhost:7001/ec2/getEventRules

    This way you'll get a JSON output, which you can parse with the following command:

    https://localhost:7001/ec2/saveEventRule

    For more details, please check the API documentation for both API calls.

    This is how the JSON output of a Soft Trigger event would look like:

      {
        "actionParams": "{\"allUsers\":false,\"authType\":\"authBasicAndDigest\",\"durationMs\":5000,\"forced\":true,\"fps\":10,\"needConfirmation\":false,\"playToClient\":true,\"recordAfter\":0,\"recordBeforeMs\":1000,\"requestType\":\"\",\"streamQuality\":\"highest\",\"useSource\":false}",
        "actionResourceIds": [
          "{2ab984a4-b807-6d2f-fc2f-9e01bbdac88d}"
        ],
        "actionType": "cameraOutputAction",
        "aggregationPeriod": 0,
        "comment": "",
        "disabled": false,
        "eventCondition": "{\"description\":\"_bell_on\",\"eventTimestampUsec\":\"0\",\"eventType\":\"undefinedEvent\",\"inputPortId\":\"30590b95-e700-448f-bcb6-cebca618d982\",\"metadata\":{\"allUsers\":false,\"instigators\":[\"{00000000-0000-0000-0000-100000000000}\"],\"level\":\"0\"},\"omitDbLogging\":false,\"reasonCode\":\"none\"}",
        "eventResourceIds": [
          "{2ab984a4-b807-6d2f-fc2f-9e01bbdac88d}"
        ],
        "eventState": "Undefined",
        "eventType": "softwareTriggerEvent",
        "id": "{70e24fa6-24b9-44e8-abdb-05b7f0466ade}",
        "schedule": "",
        "system": false
      },
    0

Please sign in to leave a comment.