Skip to main content

List

List the roles and the permissions each grants.

The list has the permissions of each behavior, so it is correct for the binary that you run. A custom role from the config's controller.api.security.roles gets a column of its own. Without a config file it shows the built-in roles only. A behavior's permissions are <name>:<verb>, such as dns:read and dns:write. A rule gives each built-in role its permissions. Use this list, not a table in the docs.

osapi controller role list

Examples​

osapi controller role list
osapi controller role list --json

Result​

The command prints:

$ osapi controller role list
Roles (7):
  NAME        SOURCE
  admin       built-in
  operator    built-in
  automation  built-in
  auditor     built-in
  read        built-in
  observer    built-in
  dns-ops     config

With --json, the command prints:

{
"roles": [
{
"name": "admin",
"source": "built-in",
"permissions": null
},
{
"name": "operator",
"source": "built-in",
"permissions": null
},
{
"name": "automation",
"source": "built-in",
"permissions": null
},
{
"name": "auditor",
"source": "built-in",
"permissions": null
},
{
"name": "read",
"source": "built-in",
"permissions": null
},
{
"name": "observer",
"source": "built-in",
"permissions": null
},
{
"name": "dns-ops",
"source": "config",
"permissions": null
}
]
}

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file; without one at the default path, osapi runs on the defaults/etc/osapi/osapi.yaml

Output tells how the result is printed, and what --json gives.