Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Get current authenticated principal

GET/v1/meGet current authenticated principal

Returns the user, workspace, and credential represented by the current token.

Responses

200Current authenticated principal retrieved.application/json
object
dataobjectrequired
Show child attributes
credentialobjectrequired
Show child attributes
idnull | stringrequired
namenull | stringrequired
typestringrequired

one of "oauth", "service_token", "management_token", "agent_token"

usernull | objectrequired
Show child attributes
emailstring · emailrequired
idstringrequired

pattern ^(usr_)([cC][^\s-]{8,}|[a-z0-9]+)$

namenull | stringrequired
workspacenull | objectrequired
Show child attributes
idstringrequired

pattern ^(wksp_)([cC][^\s-]{8,}|[a-z0-9]+)$

namestringrequired
Example response
{
  "data": {
    "credential": {
      "id": "string",
      "name": "string",
      "type": "agent_token"
    },
    "user": {
      "email": "user@example.com",
      "id": "string",
      "name": "string"
    },
    "workspace": {
      "id": "string",
      "name": "string"
    }
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu