yuuvis® Q&A

0 votes
in yuuvis Momentum by (1.3k points)

Hi Yuuvis team

We are working with the tag search and update API. The API does not really return what is descibed in the documentation.

If no result is available, a search result is returned:

{
    "objects": [],
    "numItems": 0,
    "hasMoreItems": false,
    "totalNumItems": 0
}

If a tag was updated, only a single object is returned, but without the search result properties:

{
    "objects": [
        {
            "properties": {
                ...
                "system:tags": {
                    "update": [
                        [
                            "test",
                            0,
                            "2021-03-08T06:02:56.930Z",
                            "c5221c08ae26a88c"
                        ]
                    ],
                    "value": [
                        [
                            "test",
                            0,
                            "2021-03-08T06:02:56.930Z",
                            "c5221c08ae26a88c"
                        ]
                    ]
                },
               ...
            },
            "options": {}
        }
    ]
}

Questions:

  1. Why does the empty result return properties such as the numItems but when an object is found they are missing?
  2. Even if the last element of the query matches, will only one element (the last be returned)? So in the response it is not necessary for us to check the object list for the object that was updated? We can simply assume that every object in the ist (always 1) has been updated?
Thanks and kind regards
Nicole

1 Answer

0 votes
by (780 points)
selected by
 
Best answer
Hi Nicole,

Here are finally our comments, hopefully answering your questions regarding the mentioned query endpoint for tags:
  1. If no objects could be found matching the defined query statement, the output of the SEARCH service is directly returned. Thus, some information on the search process itself are delivered together with the expected empty objects list. With one of our next releases we will remove those additional properties from the result and return only the expected empty objects list.
  2. If the endpoint returns a non-empty object list, it contains always exactly one object. Only this object was updated.

Kind regards,
Antje

Welcome to the yuuvis® Community

Welcome to yuuvis® Q&A, where you can ask questions and receive answers from other members of the community.
...