Check dhcp status test

Hi,

i would like create a little test framework for our users, so that could be checked is all fine.
for vrrp I have created a little check and this works fine.

but my check for dhcp is not good and can be different every time. At the moment is not a check is only the output from show.
here is my snipet from the jenkins.
at the moment you see only the output from show dhcp server leases

  stage('Check DHCP Status') {
        script {
            env.VYOS_API_ENDPOINT1 = "https://${params.VyosHostname2}/show"
            env.VYOS_API_ENDPOINT2 = "https://${params.VyosHostname3}/show"
            
            def response1 = sh(script: "curl -k --location --request POST '${VYOS_API_ENDPOINT1}' --form data='{\"op\": \"show\", \"path\": [\"dhcp\", \"server\", \"leases\"]}' --form key='${params.ApiDeployKey}'", returnStdout: true).trim()
            def response2 = sh(script: "curl -k --location --request POST '${VYOS_API_ENDPOINT2}' --form data='{\"op\": \"show\", \"path\": [\"dhcp\", \"server\", \"leases\"]}' --form key='${params.ApiDeployKey}'", returnStdout: true).trim()

                // Assume you have logic to parse responses and determine if the setup is correct
                // This is a placeholder for your actual comparison logic
                echo "Response from ${params.VyosHostname2}: ${response1}"
                echo "Response from ${params.VyosHostname3}: ${response2}"

Other options where that

but you have to add
dhcpd.conf
omapi-port 7911;
restart service and then you have to go to the omshell

server localhost
connect
new failover-state
set name = "internal-network"
open

to get this output

partner-state = 00:00:00:02
local-state = 00:00:00:02

all is fine

any hint for this issue?