Skip to main content

Get

Show a role and each permission it grants.

osapi controller role get [flags]

Examples​

osapi controller role get --name admin

Result​

The command prints:

$ osapi controller role get --name admin
Role:
  Name:         admin
  Source:       built-in
  Permissions:  status:read, file:read, file:write, health:read

With --json, the command prints:

{
"name": "admin",
"source": "built-in",
"permissions": ["status:read", "file:read", "file:write", "health:read"]
}

Flags​

FlagDescriptionDefault
--nameThe role, such as admin, or a custom role of the config (required)

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.