Seite 1 von 1

[gelöst] method with filter into curl option

Verfasst: 26 Apr 2023, 19:45
von rfrankow
Wie ist für curl die richtige Syntax um die Einträge gefilter zu bekommen? Ich finde keine Dokus dazu.

Code: Alles auswählen

curl --insecure --user admin:password -H "Content-Type: application/json" --data '{"attributes": [???], "filter": "???" , "method": "productPropertyState_getObjects"}' https://1.2.3.4:4447/rpc
Auf dem Server funftioniert es mit:

Code: Alles auswählen

opsi-cli --attributes propertyId,values jsonrpc execute productPropertyState_getObjects [] '{"objectId":"pcid.domain", "productId":"testprodct"}'

Re: method with filter into curl option

Verfasst: 27 Apr 2023, 10:39
von j.werner
Hallo,
so sollte es funktionieren:

Code: Alles auswählen

--data "{\"method\":\"productPropertyState_getObjects\", \"params\":[[],{\"objectId\":\"pcid.domain\", \"productId\":\"testprodct\"}], \"id\":1}"
Grüße, Jan

Re: method with filter into curl option

Verfasst: 27 Apr 2023, 11:10
von rfrankow
Es hat funktioniert, vielen lieben Dank.
Euer freier Support ist einfach Spitze!