Create a role
import requests
url = "https://{FUSION HOST}/api/roles"
payload = { "name": "test-role" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "e4ac80c6-8905-4eaf-9670-b541b41f732e",
"name": "test-role",
"createdAt": "2025-10-31T18:12:59Z",
"desc": "For testing only",
"permissions": [
{
"methods": [
"OPTIONS",
"GET"
],
"path": "/"
}
],
"uiPermissions": []
}Create a role
Create a new role in the system
POST
/
roles
Create a role
import requests
url = "https://{FUSION HOST}/api/roles"
payload = { "name": "test-role" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "e4ac80c6-8905-4eaf-9670-b541b41f732e",
"name": "test-role",
"createdAt": "2025-10-31T18:12:59Z",
"desc": "For testing only",
"permissions": [
{
"methods": [
"OPTIONS",
"GET"
],
"path": "/"
}
],
"uiPermissions": []
}Body
application/json
Was this page helpful?
⌘I