@KarthikRaja1388 opened this Issue on September 23rd 2020

A user managed to create a Segment using API in real time which not an expected behaviour. Can we investigate and check if there is any issue.

https://XXXX.matomo.cloud/?module=API&method=Actions.getPageUrls&idSite=5&period=range&date=last30,2020-09-15&format=json&token_auth=XXXX&expanded=1&flat=1&segment=pageUrl=&depth=1

@mattab commented on September 23rd 2020 Member

This is on Cloud where we have enable_create_realtime_segments = 0

@tsteur commented on September 23rd 2020 Member

Can you reproduce this @KarthikRaja1388 @mattab ? It should generally through an exception here: https://github.com/matomo-org/matomo/blob/4.0.0-a2/plugins/SegmentEditor/API.php#L108-L114

The API call above doesn't seem to be quite correct?

@xelven commented on September 23rd 2020

I was using the matomo official service create a segment via api (method: SegmentEditor.add), in the pass is all ok, but from yseterday I keep getting related error as well below:

"The Segment 'https://ics2020.eventxtra.com' is set to 'segmented reports are processed in real time' but Matomo is not currently configured to process segmented reports in API requests. To see data for this report in the future, you will need to edit your segment and choose the option labeled 'segmented reports are pre-processed (faster, requires cron)'. Then after a few hours your segment data should become available through the API. (If it does not, there may be a problem.)"

it is something updated in there recently ?
what can I do to avoid it in API create SegmentEditor.add with segmented reports are processed in real time ?

@tsteur commented on September 23rd 2020 Member

I can reproduce this locally and created a patch in https://github.com/matomo-org/matomo/pull/16465

@xelven there was nothing updated recently.

what can I do to avoid it in API create SegmentEditor.add with segmented reports are processed in real time ?

Make sure to set &autoArchive=1 in the API and then it would work. It's possible above message was only shown because the report had not been generated yet and it will go away soon (or maybe is already).

This Issue was closed on October 1st 2020
Powered by GitHub Issue Mirror