JSON command - how is it right ?

  • Hello,

    how can i post this JSON Command via SSH under Librelec?

    Code
    curl -X POST -H "content-type:application/json" http://192.168.133.114:8090/json-rpc?request{"command":"componentstate","componentstate":{"component":"ALL","state":false}}


    --> Doesnt work:

    Code
    LibreELEC:~ # curl -X POST -H "content-type:application/json" http://192.168.133.114:8090/json-rpc?request{"command":"componentstate","componentstate":{"component":"ALL","state":false}}
    curl: (3) nested brace in URL position 84:
    http://192.168.133.114:8090/json-rpc?request{command:componentstate,componentstate:{component:ALL,state:false}}


    Thanks!

  • I think something like that should work for you:

    Code
    curl -X POST -H "content-type:application/json" --data '{"command":"componentstate","componentstate":{"component":"ALL","state":false}}' http://192.168.133.114:8090/json-rpc