Hi,
Here is what I was trying to accomplish,
from requests.auth import HTTPBasicAuth
import requests
import json
requests.packages.urllib3.disable_warnings()
username = 'rakib'
password = '1234'
url = 'https://10.248.27.226/rest'
new_queue = {
"name": "Home_Client",
"target": "192.168.1.100/32",
"max-limit": "5M/5M"
}
response = requests.post(url + '/queue/simple', json=new_queue, auth=HTTPBasicAuth(username, password), verify=False)
print(response.text)
The error seems 400 code, which is,
{“detail”:“no such command”,“error”:400,“message”:“Bad Request”}
I think, the payload format is not correct.