Triggering an action from the Rest API

I am running Home Assistant on a Raspberry Pi at 192.168.0.15 and using the Rest API to pull sensor information.
In configuration.yaml I have

http:
    cors_allowed_origins: 
        - 'null'

counter:
  lap_counter:
    initial: 0
    step: 1

From the same Pi I issue the following command

           curl -X GET -H "Authorization: Bearer llat " http://192.168.0.15:8123/api/states?entity_id=sensor.*

where llat is the long lived access token.

This works perfectly and pulls all the information I’ve requested.

Now I want to add an action so that the counter increments every time the Rest API is queried, but I can’t find any information about what event to use.
I’ve not been successful with all sorts of variants like eg

  trigger:
    platform: event
    event_type: http_request

Can anyone throw any light please.

Suggestion: whenever you issue the GET query from the Pi, also do a POST query to update a sensor with the current time, and update the counter with an automation triggered by that update.

curl -k -X POST -H "Authorization: Bearer llat" -H "Content-Type: application/json" -d "{\"state\":\"`date +%s`\"}" http://192.168.0.15:8123/api/states/sensor.last_rest_query

Thanks, that may be the best I can achieve. I’ve scoured the http and Rest API docs and can’t find any better way to get a success update. Nor any way to capture unsuccessful requests beyond the log, which shows authorisation failures but not eg CORS rejections.