Using url from config file
This commit is contained in:
2
main.py
2
main.py
@@ -21,7 +21,7 @@ if __name__ == '__main__':
|
|||||||
"X-API-Key": config.access_token
|
"X-API-Key": config.access_token
|
||||||
}
|
}
|
||||||
|
|
||||||
api_url = "https://portainer.dorfsvald.net/api/stacks"
|
api_url = f"{config.portainer_url}/api/stacks"
|
||||||
response = requests.get(api_url, headers=headers)
|
response = requests.get(api_url, headers=headers)
|
||||||
stack_list = response.json()
|
stack_list = response.json()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user