REST API: Error by install/enable snap

Hey all,

I have the same question as this thread, how we can proceed?
What we missing??

https://forum.snapcraft.io/t/rest-api-error-refreshing-snap-selecting-channel/2563

Successfully remove a snap was good, but an install produce me this error:

string "{
    "result": {
        "message": "unsupported option provided for multi-snap operation"
    },
    "status": "Bad Request",
    "status-code": 400,
    "type": "error"
}"

JSON:

modul={
 "action": "install",
 "snaps": ["mymodul"],
 "channel": "beta"
 }

I doing that with python and requets.
And they have the snap interface on snapd-control

Greets

greets Tony

You can currently only specify options such as channel when operating on the individual snap endpoint.

That is: what you need to do is POST {"action": "install", "channel": "beta"} to /v2/snaps/mymodul.

Hey @chipaca , thanks that works, can I do this kind of url also for disable, enable, remove, refresh?
Also looks that the github wiki is not on this actually workflow.

https://github.com/snapcore/snapd/wiki/REST-API

Greets

It’s there.