Skip to main content

http event with content of generic event

Completed

Comments

7 comments

  • Anton Babinov
    • Network Optix team

    Hello Fabian,

    could you please layout an example of what kind of information do you want to send to NxWitness and how it should be processed? 

    0
  • Fabian Penasse

    Hi, 

    We are already receiving generic data from our service in NxWitness, this is a generic event with source caption "Lpr1WhiteList", within this information there is some extra information.

    When we have this event 'Generic Event with source caption Lpr1WhiteList'  in Nx Witness we want to send this information true an action 'do http request' to a 3th party, but we see that the http content is not forwarded.

    Extra info If the action is an email then we see the extra source information in the email, we would like to have this also in the http event.

     

    0
  • Anton Babinov
    • Network Optix team

    Could you please show me screenshot of your "do http request" rule?

    You can use variables {event.source}, {event.caption}, {event.description}  to pass data fields from generic events to your 3rd party application.

    0
  • Fabian Penasse

    Hi,

    They Confirm receiving it now with the extra http content you gave me. But they say it is plain text, can we change the format to json as content ?

    0
  • Fabian Penasse

    Can we also include a snapshot image from any camera from the moment that specific generic event occurs. It would be awesome if I can send the vehicle snapshot with the LPR data, all in that same HTTP request?

     

     

    0
  • Anton Babinov
    • Network Optix team

    Rules engine can't convert plain text to json. If they will be sending data via generic event already in JSON, HTTP context body like below should work:

    [{event.source}, {event.caption}, {event.description}]

    Assuming that generic event is send with request like this:

    /api/createEvent?caption={"name1":"value1","name2":"value2"}&source={"name1":"value1","name2":"value2"}&cameraId=<id>

     

    0
  • Tagir Gadelshin
    • Network Optix team

    Fabian Penasse there is no such feature as sending snapshots in HTTP request. We may add it in the future, but as of now, you can obtain them in your external service using /ec2/cameraThumbnail API. Take a look at these comments in our community threads:
    https://support.networkoptix.com/hc/en-us/community/posts/360046669994/comments/360011568294

    The API call may look like this:

    https://{NxServerIp}:{port}/ec2/cameraThumbnail?cameraId={cameraId}&time=now


    In order to know the exact timestamp, you may need to send it in the event, using one of {event.source}, {event.caption}, {event.description}

    0

Please sign in to leave a comment.