Start and stop containers via REST API?

Can anyone help? I’ve been trying to start and stop a container via the REST api but I can’t figure out what to put in the POST request.

You can do a GET request to /rest/container first, that will get you the “.id” for your container. If the container never get deleted then .id never changes, so may be able to skip this step. The “.id” should have a star (*) and a number, like *33. This .id also should up in CLI via “/container/print show-ids”

With the .id of the container, you can then do a POST to /rest/container/start, with a JSON body like { “number”: “*33” } — where “number” means the “.id” of the container.

_FWIW , I created a schema for the REST API that’s usable in stuff like Postman that helps figure some of these things out: http://forum.mikrotik.com/t/rest-api-schema-for-postman-more/169502/1

@user442 using what tools?
curl would be good?