HTTP Binding - send command and receive string

Hi all,
started on my first config of the hpp binding with OH3.4
I don’t get an idea how to start.
I need to call: api/call/dial?number=sip:10@…
The result of this will be like:

  "success" : true,
  "result" : {
    "session" : 17

When I configure this I get the result but the command is send again and again, even without a linked item to the channel.
How can I configure the channel to only be executed on a switch item? and receiving the result in a string item?
And next question how to send then the result of the string item into the command of another channel?

The http binding is designed to frequently execute the same command. Therefore you can configure the refresh parameter within the thing.

If you only want to call your url based on a switch you need a rule:
Either execute the http action directly within the rule or dynamically enable / disable the http thing within the rule

ok, I thought the binding is although used for switching lights on/off. What kind of commands do I want to send a thousand times?
I think enable and disable a thing is not a good practice, I would need for each command channel a new thing…
I hope I can find something about http authentification for Java Script to build everything in a rule

Maybe not commands but reading days from another website where no other binding exists.
Also the http binding differentiate between getting an items state (therefore automatic refresh is required) and sending an command.
If an item that’s linked to the channel receives a command, the command will be forwarded ia the http thing

That’s already available, please have a look into actions, that you can use in your rules

Please share your full configuration. Use the Code tab of your Thing, and share the code.

UID: http:url:81bc4ddd57
label: HTTP URL Thing
thingTypeUID: http:url
  authMode: DIGEST
  ignoreSSLErrors: true
  baseURL: https://192.168....
  password: ....
  delay: 0
  stateMethod: GET
  refresh: 30
  commandMethod: POST
  timeout: 3000
  bufferSize: 2048
  username: openhab
  - id: system_status
    channelTypeUID: http:string
    label: System Status
    description: ""
      mode: READONLY
      stateExtension: /api/system/status
  - id: system_time
    channelTypeUID: http:string
    label: System Time
    description: null
      mode: READONLY
      stateExtension: /api/system/time

To COMMAND stuff, like using a switch, you need to use the commandExtension. Check docs for info, especially examples at end of page.