• J
    Johautt

    @jared-wiltshire said in Questions about point-values endpoint:

    /rest/v2/point-values/time-period/

    Ok, thank you!!! I had not take a look to this endpoint before. It is good to know this variant of the request.

    posted in Mango Automation general Discussion read more
  • J
    Johautt

    Yes, i use the swagger documentation.

    By this commentary you said:

    @jared-wiltshire said in Questions about point-values endpoint:

    would probably use the V2 version of the point values REST controller

    I searched and found in the documentation the endpoint mentioned. I was just a little confused with the fact that it doesn't have the {xid} parameter in the url. But i found the xid in the body.
    Thank you!!!

    posted in Mango Automation general Discussion read more
  • J
    Johautt

    Ok, i see the problem.
    There is something bad, but with the code i am using.
    It does not give me the trailing time zone characters. I will modify this code and test.

    With respect to the V2 version of the point-value, is it the POST request of path /rest/v2/point-values?

    posted in Mango Automation general Discussion read more
  • J
    Johautt

    Hi again.

    I have two questions about the GET request over /rest/v1/point-values/{xid} endpoint.

    1. This endpoint responds an array of collections, something like this:
    [
      {
        "value": 35,
        "timestamp": 1560516758380,
        "annotation": null
      },
      {
        "value": 35,
        "timestamp": 1560516818380,
        "annotation": null
      },
      ...
    ]
    

    While i expected the response to be similar to the one delivered by the events endpoint.

    {
      "values": [
      {
        "value": 35,
        "timestamp": 1560516758380,
        "annotation": null
      },
      {
        "value": 35,
        "timestamp": 1560516818380,
        "annotation": null
      },
      ...
      ],
      "total": 10
    }
    

    I just want to ask if this is the expected behaviour, to adapt my code to this response.

    1. When i add this query from=2019-06-14T04:00:00.000Z&to=2019-06-15T03:59:59.999Z to the GET request, i mean, something like this:
    http://[host]:[port]/rest/v1/point-values/{xid}?from=2019-06-14T04:00:00.000Z&to=2019-06-15T03:59:59.999Z
    

    all works flawlessly. But when i put this query from=2019-06-14T00:00:00.000&to=2019-06-14T23:59:59.999 or this query from=1560484800000&to=1560571199999 (the same time range as the previous, but in milliseconds since epoch), it returns me a 400 (bad request) error.
    I ask if there is something bad with this format.

    Thank you...

    posted in Mango Automation general Discussion read more
  • J
    Johautt

    Greetings!!!
    I am listening WebSocket events by the endpoint

    /rest/v1/websocket/events
    

    I am sending the following JSON data:

    {
      "eventTypes":[
        "RAISED",
        "ACKNOWLEDGED",
        "RETURN_TO_NORMAL",
        "DEACTIVATED"
      ], "levels":[
        "LIFE_SAFETY",
        "CRITICAL",
        "URGENT",
        "WARNING",
        "IMPORTANT",
        "INFORMATION",
        "NONE"
      ]
    }
    

    With this data, i just get the events filtered by "eventTypes" and "levels".
    Is there a way to get event messages filtered by another filters, apart from these two?
    It would be useful some query format like in the AST endpoint:

    /rest/v1/events/query
    

    Thanks...

    posted in Mango Automation general Discussion read more
  • J
    Johautt

    By the way, i want to take the opportunity to ask what is the message body in /v1/events/acknowledge useful for. How can i use it? I refer to:

    {
      "args": [
        "string"
      ],
      "key": "string"
    }
    

    Do you prefer i to ask this in another topic?

    posted in User help read more
  • J
    Johautt

    Good morning. Yes, i had looked in swagger. And tested the

    http://localhost:8080/rest/v1/events/acknowledge
    

    end-point, and i can acknowledge with it. But in this case, i want to toggle the silence into the alarm without make the acknowledge.
    I will take the suggestion of network tab for the old events page.

    posted in User help read more
  • J
    Johautt

    I want to read and mute events by an endpoint in the REST API.
    But i found that the only way to make changes to change this is through the legacy interface.
    0_1558384940864_9f212bc2-4071-4b57-8c81-ed6bf6e1bcdf-imagen.png
    Is the a way to read/change the state of audio alarm sounds by API?
    Thanks...

    posted in User help read more