Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

List permissions

Returns every permission, the roles a person can hold and the presets an API key can start from. The Console and the CLI read this list, so what they show is what the server checks. No credential is needed.

GET/_luna/permissions
Responses
200

The permission catalog.

resourcesResourceItem[]required

What access is given to. Each has up to two levels, read and write.

Show properties
Array of ResourceItem
idstringrequired
namestringrequired
groupstringrequired

The heading the resource is listed under.

readstring[]required

The permissions its read level is made of. Empty when it has no read level.

writestring[]required

The permissions its write level adds.

alwaysReadbooleanrequired

Whether anything that reaches the project can read it.

keysbooleanrequired

Whether an API key can hold it. The rest are for people.

rolesSetItem[]required

The roles a person can hold in an organisation, most able first.

Show properties
Array of SetItem
idstringrequired
namestringrequired
aboutstringrequired
permissionsstring[]required
presetsSetItem[]required

What an API key can start from.

Show properties
Array of SetItem
idstringrequired
namestringrequired
aboutstringrequired
permissionsstring[]required
default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Request
curl -X GET 'https://luna.example.com/_luna/permissions' \
  -H 'Accept: application/json'
Response
{
  "resources": [
    {
      "id": "string",
      "name": "string",
      "group": "string",
      "read": [
        "string"
      ],
      "write": [
        "string"
      ],
      "alwaysRead": true,
      "keys": true
    }
  ],
  "roles": [
    {
      "id": "string",
      "name": "string",
      "about": "string",
      "permissions": [
        "string"
      ]
    }
  ],
  "presets": [
    {
      "id": "string",
      "name": "string",
      "about": "string",
      "permissions": [
        "string"
      ]
    }
  ]
}

Was this page helpful?