Get a user profile Added in 8.2.0

GET /_security/profile/{uid}

Get a user's profile using the unique profile ID.

Path parameters

  • uid string | array[string] Required

    A unique identifier for the user profile.

Query parameters

  • data string | array[string]

    List of filters for the data field of the profile document. To return all content use data=*. To return a subset of content use data=<key> to retrieve content nested under the specified <key>. By default returns no data content.

Responses

GET /_security/profile/{uid}
curl \
 -X GET http://api.example.com/_security/profile/{uid}
Response examples (200)
{
  "profiles": [
    {
      "uid": "string",
      "user": {
        "email": "string",
        "full_name": "string",
        "realm_name": "string",
        "realm_domain": "string",
        "roles": [
          "string"
        ],
        "username": "string"
      },
      "data": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "labels": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "enabled": true,
      "last_synchronized": 42.0,
      "_doc": {
        "_primary_term": 42.0,
        "_seq_no": 42.0
      }
    }
  ],
  "errors": {
    "count": 42.0,
    "details": {
      "*": {
        "type": "string",
        "reason": "string",
        "stack_trace": "string",
        "caused_by": {},
        "root_cause": [
          {}
        ],
        "suppressed": [
          {}
        ]
      }
    }
  }
}