v1

latestOpenAPI 3.0.12026-07-17311136.1 KB
identity

Get the identity of the currently authenticated user. If present, a `permissions` argument may be specified to check what actions the user currently is authorized to take.

get/api/me

Query parameters

permissionsstring

JSON-serialized dictionary of {"resource": ["action",]} (dict of lists of strings) to check. The same dictionary structure will be returned, containing only the actions for which the user is authorized.

Response

The user's identity and permissions

permissionsPermissions

A dict of the form: {"resource": ["action",]} containing only the AUTHORIZED subset of resource+actions from the permissions specified in the request. If no permission checks were made in the request, this will be empty.

Example response

{
  "identity": {
    "username": "minrk",
    "name": "Min Ragan-Kelley",
    "display_name": "Min RK",
    "initials": "MRK"
  },
  "permissions": {
    "contents": [
      "read",
      "write"
    ],
    "kernels": [
      "read",
      "write",
      "execute"
    ]
  }
}