Docker or Portainer integration

I’ve search the forums but’ve come up empty.
I’m looking for a way to integrate from HA to Docker Engine or Portainer (think Portainer has some APIs)
I want to be able to monitor and restart containers from an automation or script. Is this possible?


The only way I know how to access Docker containers from HA is using the following:


Yeah I use that to get stats for my containers (memory etc) as well as turning on/off. Works great.

Thanks a bunch!