diff --git a/portainer/stacks.py b/portainer/stacks.py index 765b6d7..f82f28d 100644 --- a/portainer/stacks.py +++ b/portainer/stacks.py @@ -13,4 +13,12 @@ class StacksApi(ApiBase): def update_stack(self, webhook): url = f"{self.base_url}/stacks/webhooks/{webhook}" return self.request("POST", url) + + def start_stack(self, stack_id): + url = f"{self.base_url}/stacks/{stack_id}/start" + return self.request("POST", url) + + def stop_stack(self, stack_id): + url = f"{self.base_url}/stacks/{stack_id}/stop" + return self.request("POST", url) \ No newline at end of file