import requests
url = "https://{FUSION HOST}/api/roles"
payload = {
"name": "test-role",
"desc": "For testing only",
"permissions": [
{
"methods": ["GET", "OPTIONS"],
"path": "/"
}
],
"uiPermissions": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)