Api and how to transfer variable to a script

I have a script to stop a Apple TV:

alias: AppleTV_Standby
fields:
  entities:
    description: The entities to turn off
    example: media_player.apple_tv_living
sequence:
  - alias: Stop Apple TV
    service: media_player.turn_off
    target:
      entity_id: "{{ entities }}"
    data: {}
mode: single
icon: mdi:power-standby

How to execute this script with the rest api? how to transfer the entities variable?