initial commit
This commit is contained in:
parent
bab6717459
commit
f5f3017731
5 changed files with 45 additions and 0 deletions
16
portainer/stacks.py
Normal file
16
portainer/stacks.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from .base import ApiBase
|
||||
|
||||
|
||||
class StacksApi(ApiBase):
|
||||
def list_stacks(self):
|
||||
url = f"{self.base_url}/stacks"
|
||||
return self.request("GET", url).json()
|
||||
|
||||
def get_stack_by_id(self, stack_id):
|
||||
url = f"{self.base_url}/stacks/{stack_id}"
|
||||
return self.request("GET", url).json()
|
||||
|
||||
def update_stack(self, webhook):
|
||||
url = f"{self.base_url}/stacks/webhooks/{webhook}"
|
||||
return self.request("POST", url)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue