Passing data via a URL

Go easy on my here, I’m new to home assistant/yaml

I’m trying to send URL information directly from my an application called AI tool (AI security camera tool) to Home Assistant, embedded in the URL would be information on what the cameras detected and what the probability of a positive ID is.

I’ve chosen to make the URL to being sent from AI Tool -->> To Home Assistant as follows:
http://192.168.1.65:8123/api/states/sensor.front_door_cam_percent?memo=person%20(99.54%)

Of course the memo variable would change for each instance.

On the home assistance end I have a sensors.yaml file containing

- platform: rest
  resource: http://192.168.1.65:8123/api/states/sensor.front_door_cam_percent
  json_attributes:
    - memo
  headers:
    authorization: !secret rest_token
    content-type: "application/json"
    User-Agent: Home Assistant
  name: FrontDoorPercent
  value_template: "{{ value_json.state }}"
  unit_of_measurement: "%"

Once again, go easy on me here, I know so far I’m way off base, I’m having issues with authentication among the least. I’ve read through a lot of documentation and forums, but this one is really stumping me. But any help in at least steering me down the right path would be much appreciated.

You don’t need the REST sensor. It is intended for requesting data from another location, e.g. if your AI tool exposed an endpoint for HA to call.

I haven’t done any integrations using the HA API but from what I can see you need to do 3 things: (1) Make sure you execute a POST to set the state (as opposed to a GET that will read it), (2) pass the info not as query parameters (the bit after the ?) but as JSON data and (3) pass the auth credentials to HA in the headers. I don’t know if it’s possible with your tool though.

If you can’t, you could set up an nginx proxy to basically convert the request format from the one to the other. This is what I can think of right now from bed. There may be more efficient ways.