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

Status Page

Triggering inference in a 3rd party REST based analytics integration from Nx Witness Client UI

Planned

Comments

3 comments

  • Ichiro
    • Network Optix team

    Hi Sajeev,

    Yes, this is doable. What you need is the settings manifest, which is the data structure each Analytics Engine's DeviceAgent returns to the Server after it's created.

    The field descriptions are in /server_plugin_sdk/src/nx/sdk/settings_model.md inside the SDK.

    Once you have the manifest defined in JSON, push it via the API:

    For an external analytics service integration, site-level (Engine manifest) is usually the right scope. For your threshold use case, a SpinBox or DoubleSpinBox type would work. 

    After setting the manifest, use: GET /rest/v4/analytics/engines/{id}/settings

    to read back the current values.

     

     

    One important note: these Analytics APIs only apply to integrations created via the API. SDK/plugin-based integrations cannot use these endpoints.

    0
  • Sajeev

    Thanks for the response.

    Does it mean my analytics integration needs to keep polling GET /rest/v4/analytics/engines/{id}/settings for any change in the settings. And once user updates relevant fields/checkboxes in the device settings in the UI, based on the updated manifest, I can then trigger my inference run ?

     

    0
  • Ichiro
    • Network Optix team

    Hi Sajeev,

    Usually, you may poll the endpoint but we also provide the JSON-RPC for callback.

    https://meta.nxvms.com/doc/developers/api-tool/analytics-api-callbacks-1?type=1

    I might suggest use websocket connection with JSON-RPC in your use case.
    Thanks.

    0

Please sign in to leave a comment.