Get a user profile Added in 8.2.0

GET /_security/profile/{uid}

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

NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.

Path parameters

  • uid string | array[string] Required

    A unique identifier for the user profile.

Query parameters

  • data string | array[string]

    A comma-separated 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

  • 200 application/json
    Hide response attributes Show response attributes object
    • profiles array[object] Required

      A successful call returns the JSON representation of the user profile and its internal versioning numbers. The API returns an empty object if no profile document is found for the provided uid. The content of the data field is not returned by default to avoid deserializing a potential large payload.

      Hide profiles attributes Show profiles attributes object
    • errors object

      Additional properties are allowed.

      Hide errors attributes Show errors attributes object
      • count number Required
      • details object Required
        Hide details attribute Show details attribute object
        • * object

          Additional properties are allowed.

          Hide * attributes Show * attributes object
          • type string Required

            The type of error

          • reason string

            A human-readable explanation of the error, in English.

          • The server stack trace. Present only if the error_trace=true parameter was sent with the request.

          • Additional properties are allowed.

          • root_cause array[object]

            Additional properties are allowed.

          • suppressed array[object]

            Additional properties are allowed.

GET /_security/profile/{uid}
curl \
 --request 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": [
          {}
        ]
      }
    }
  }
}