Issue with Custom Plugin for Receiving JSON via HTTP in Nx Meta

In Progress

Comments

3 comments

  • Avatar
    Ichiro

    Hi Jose M Martinez,

    Thank you for your question.
    This behavior is expected because the API endpoint you referenced does not exist.

     

    I’m not sure where you found the reference to this endpoint—perhaps it is custom or from an external source. However, based on the source code, your request was sent to a non-existent endpoint, which is why you received a 404 error. This is expected and correct behavior.

     

    If you need further clarification or information on the supported API endpoints, feel free to let me know.

    0
    Comment actions Permalink
  • Avatar
    Jose M Martinez

     

    My intention is to create a plugin that allows accepting POST requests similar to createEvent, with the difference that I want to add a bounding box to draw the rectangle where the event took place. I have been reviewing your API, but I cannot find how to create this plugin to accept that request
    .
    https://meta.nxvms.com/doc/developers/api-tool/apiinformation?type=1&system=18

    Is this possible, or is it not considered?

    Something like this, more or less:
    json analytics_event = {
                {"id", "89abcdef-0123-4567-89ab-cdef01234567"},
                {"integrationId", "analytics.http_receiver"},
                {"type", "detection"},
                {"source", "external_detector"},
                {"timestamp", std::chrono::duration_cast<std::chrono::seconds>(
                    std::chrono::system_clock::now().time_since_epoch()).count()},
                {"data", {
                    {"id_nvr", 1},
                    {"id_device", "CAM001"},
                    {"bbox", {
                        {"x", 0.1},
                        {"y", 0.2},
                        {"width", 0.3},
                        {"height", 0.4}
                    }}
                }}
            };

    0
    Comment actions Permalink
  • Avatar
    Ichiro

    Hi 

    This is likely doable via the new v4 Analytics API of Nx.
    The boundary box is one of the parameters of the object's metadata, so it is possible to use API to attach or  configure the necessary information. 


    However, this is a new feature now in BETA version, and it is available within Nx Witness 6.1.0.
    If this API fits your desires, we are more than welcome to try.

    Thanks.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.