Skip to main content

use API createBookmark and saveEventRule

Completed

Comments

4 comments

  • Ichiro
    • Network Optix team

    Hi Ellen,

    Thanks for your questions. Regarding your questions:

    I got "ok" response but no bookmark or test shown on the camera in real time

    How did you check the bookmark, have you check the bookmark search?
    Can you show the bookmark search result to make sure the bookmark isn't existing?

    2. Is there anything else needs to done while creating a bookmark via API? 

    If I understand correctly, you are expecting to use the API to create an event with bookmark creation. am I correct? If yes, can you please provide the full JSON object here so we can check which issue is in the object?

    Thanks.

    0
  • Ellen

    Hi Ichiro, thank you very much for your response.

    About your 1st question: please check the attached bookmark search result screen on DW Spectrum client. As you will see, there are two manually created bookmark in the list, there is no bookmark created by API in February. Again, we need the API generated bookmark in real time. BTW, any specific license or product version needed for API bookmark thing.

    About your 2nd question: Yes, looks like I have to create Event Rule before creating bookmark via API, is that correct? Below is the my testing request body for  API "/rest/saveEventRule". "999d23ee-2d18-4bfd-a53e-06148f6ee495" is the unique GUID generated thru https://guidgenerator.com/

    {
      "id": "999d23ee-2d18-4bfd-a53e-06148f6ee495",
      "eventType": "undefinedEvent",
      "eventResourceIds"[
        "999d23ee-2d18-4bfd-a53e-06148f6ee495"
      ],
      "eventCondition": "",
      "eventState": "inactive",
      "actionType": "undefinedAction",
      "actionResourceIds"[
        "999d23ee-2d18-4bfd-a53e-06148f6ee495"
      ],
      "actionParams": "",
      "aggregationPeriod"0,
      "disabled": true,
      "comment": "",
      "schedule": "",
      "system": true,
      "EventState": "string"
    }

    thank you again.

    Ellen

    0
  • Patrick Kelly
    • Authorized Reseller

     Ichiro,

    Ellen is trying to create a Point of Sale (POS) integration. CreateEvent = Bookmark. 

     

    Yes Ellen it is correct you need to use the  CreateEvent API   with the POS data in the description and the unique Source for each Register.

    Bookmark is a standard action that can be created in the UI from the event. 

    0
  • Ichiro
    • Network Optix team

    Hi Ellen, Patrick Kelly

    Thanks for the explanation and the update.  It is nice to hear and see you have great idea of the integration by using the feature of "Generic Events" and Rules/Engines built-in DW Spectrum.

    And yes, Patrick Kelly is right, you can use the generic event API to create the trigger and then use the standard bookmark actions for this use cases.

     

    0

Please sign in to leave a comment.