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.

Changed on
get/api/me

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    none declared

Query parameters

permissions, string

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

object required
identity, Identity

The identity of the currently authenticated user

permissions, Permissions

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"
    ]
  }
}

Changes