how to use API with variable inside the API
example , we replace the INSTALLED with ACTION=INSTALLED
and then we run the follwing
curl -u $USER:$PASSWD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Stop AMBARI_METRICS via REST"}, "Body": {"ServiceIfo": {"state": "$ACTION"}}}' http://$HOST:8080/api/v1/clusters/$CLUSTER_NAME/services/AMBARI_METRICSbut the API not accepted the variable - $ACTION
please advice how to set the variable ACTION in the API so API will read this variable
example of API output when using the variable
HTTP/1.1 400 Bad Request
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: no-store
Pragma: no-cache
Set-Cookie: AMBARISESSIONID=1t1s2senrg3mtqgzda2qp8yv6;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
User: admin
Content-Type: text/plain
Content-Length: 313
Michael-Bronson