The check you are trying to do looks for the string in plain text, so it is looking literally for {"state": "copy"}, what is not present as is in the response body.
This would probably work if you remove the curly brackets:
Notice also that the body field needs to be defined as a list that contains a list of expressions.
Starting on heartbeat 6.6.0 (see #8667) it will be also possible to use specific JSON checks. Though your case would need quite complex conditions (not sure if even possible) as this state field is inside a list and an object of unknown name.
But you will be able to check for example the server status with:
check.response:
status: 200
json:
- description: 'check server status'
condition:
equals:
status: ok
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.