Search events by response models

What product/components do you use and which version/fix level are you on?

Is your question related to the free trial, or to a production (customer) instance?

What are you trying to achieve? Please describe it in detail.

I want to implement search on event data models .at the moment none of the parameters available is becoming helpful except being pre defined filters as shown belows

can you please advise how to search through my non/semi structured documents over some of its field

Do you get any error messages? Please provide a full error message screenshot and log file.

Have you installed all the latest fixes for the products and systems you are using?

Hi @Harshil_Gandhi ,

could you please share more details on the data structure of your events and what/how you want to search them?

Regards Kai

Below is my single event structure

“events”: [
{
“creationTime”: “2022-11-08T10:03:49.508Z”,
“source”: {
“name”: “Demo_Sensor_Visual_MCS-02I502”,
“self”: “https://t129954457.emea.cumulocity.com/inventory/managedObjects/524”,
“id”: “524”
},
“type”: “UDI-Event”,
“lastUpdated”: “2022-11-08T10:03:49.508Z”,
“self”: “https://t129954457.emea.cumulocity.com/event/events/381623”,
“time”: “2022-11-08T11:03:48.000+01:00”,
“id”: “381623”,
“text”: “Quality test event”,
“image_string”: “/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAFA3PEY8MlBGQUZaVVBfeMiCeG5uePWvuZHI////////////////////////////////////////////////////wAALCAEdBCQBAREA/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9oACAEBAAA/AKlFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFJRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRS0lFFFFFFFLRRSUtFFFFFFFJRRRRRRRRRRRRRRRRS0qdakpKKD1ozSGg1ds/wDVfjViiiiikpDRRRRRRSCikooNZdF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RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRS0UUlFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUtJRRRS0lFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFf/9k=”,
“lot”: “”,
“test_status”: “Rejected”,
“reason”: “No code”,
“ref”: “”,
“event_type”: “UDI-Event”,
“producer”: “”,
“location”: “Cris-2”,
“child_type”: “Demo_Sensor_Visual_MCS-02I502”,
“udi-type”: “HIBC”,
“udi-code”: “”,
“quality”: “A”
}

i want to implement full text search entirely across all events with in my tenant DB

Is there any endpoint which allows me to do full text search and generates paging on top of searched content

statistic in Pagination is flawed on event endpoint
in this case Server side paging never works

  • The event endpoint by default gives 5 records per page if not queried by any query parameters

  • With this,It gives total number of pages for all events

  • As you pass the query parameter in Endpoint,the resultant dataset removes total pages,This is weired and Endpoint is not consistent,pagination can never work in this scenario

I do not want to treat my page as server side linked list for pagination and next and previous link i do not use it for binding it to my paginated client component

Please make totalpages consistent

result data models are not consistent in filtering and search

There is no full text search API on events available.
Only parameters available in the documentation can be used, e.g. you can query only for events which contain a specific fragment with the fragmentType and optionally also the value (in case of String value) with the fragmentValue parameter.

Regarding your remarks:

This is correct. With the pageSize and currentPage parameters you can specify the page size (max 2000) and the page you want to retrieve.

Total number of pages is only added if the parameter withTotalPages is set to true.

I am afraid this is an error on your end. Please try using Postman with the parameters correctly and do not mix between adding parameters in the “table format” (like withTotalPages) and in the “address bar” (like source).
Properly sending the parameters will return the result as expected.

open your browser you will see the same result (Postman or No Postman)

totalpages are not consisent. its fine if its not there but i can make verification for my implementation

This is true for measurements endpoint as well by the way

is it possible to get source code of events microservice ,I would change by myself. if its not possible at your end

Please watch your tone, we want to keep a friendly environment in this community :slight_smile:

You are missing to add the required withTotalPages=true parameter!
Please always add this to your queries if you want the totalPages to be included in the response.

This parameter is by default false, hence no totalPages are given.

I understand that it might be confusing as the event API returns totalPages when no parameters are given at all. I will delegate this to R&D.

2 Likes

Marking it as answer,It would have been concluded more friendly if answered in first instance

Thanks anyways.!Apologies for any offense

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.