---
title: "FetchPrincipalResponse"
url: "https://nov18-dev.movespot.fyi/apis/konnect-kong-identity-auth-api-dev-0/versions/95ca6cb9-c471-4475-a351-61326ecea57b/schemas/FetchPrincipalResponse"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-kong-identity-auth-api-dev-0/versions/95ca6cb9-c471-4475-a351-61326ecea57b.md

# FetchPrincipalResponse

Response returned after a successful fetch-principal operation. Wraps the resolved principal with cache control metadata.

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Kong Identity auth api
  version: 0.0.2
servers:
  - url: https://us.api.konghq.com
    description: United-States Production region
  - url: https://eu.api.konghq.com
    description: Europe Production region
  - url: https://au.api.konghq.com
    description: Australia Production region
  - url: https://me.api.konghq.com
    description: Middle-East Production region
  - url: https://in.api.konghq.com
    description: India Production region
  - url: https://sg.api.konghq.com
    description: Singapore Production region
components:
  schemas:
    Principal:
      description: >
        A principal resolved from the directory. Contains the principal's
        identity and metadata.
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        display_name:
          description: Human-readable name of the principal.
          type: string
        metadata:
          $ref: "#/components/schemas/KongIdentityMetadata"
        created_at:
          $ref: "#/components/schemas/CreatedAt"
        updated_at:
          $ref: "#/components/schemas/UpdatedAt"
      required:
        - id
        - display_name
        - metadata
        - created_at
        - updated_at
    ConsumerIdentity:
      description: >
        The Kong consumer associated with the resolved principal in the given
        control plane and workspace context.
      type: object
      properties:
        id:
          description: The unique identifier of the Kong consumer.
          type: string
        control_plane_id:
          description: The Kong control plane this consumer belongs to.
          type: string
        workspace_id:
          description: The workspace within the control plane, if applicable.
          type: string
          nullable: true
      required:
        - id
        - control_plane_id
    UUID:
      description: Contains a unique identifier used for this resource.
      type: string
      format: uuid
      example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
      readOnly: true
    KongIdentityMetadata:
      description: >
        A map of metadata key-value pairs associated with this entity. This
        metadata is passed to the data plane 

        to enrich the execution context. During authentication, metadata is
        inherited and overridden in a hierarchical 

        manner: Directory metadata is inherited by Principals, which is then
        inherited and overridden by Credentials.
      type: object
      additionalProperties:
        oneOf:
          - type: string
            format: date-time
          - type: boolean
          - type: string
          - type: integer
          - type: array
            items:
              type: string
            minItems: 0
            maxItems: 255
            uniqueItems: true
          - type: array
            items:
              type: integer
            minItems: 0
            maxItems: 255
            uniqueItems: true
      maxProperties: 50
      minProperties: 0
      nullable: true
    CreatedAt:
      description: An ISO-8601 timestamp representation of entity creation date.
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      readOnly: true
    UpdatedAt:
      description: An ISO-8601 timestamp representation of entity update date.
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      readOnly: true
    FetchPrincipalResponse:
      description: |
        Response returned after a successful fetch-principal operation.
        Wraps the resolved principal with cache control metadata.
      type: object
      properties:
        principal:
          $ref: "#/components/schemas/Principal"
        ttl_secs:
          description: |
            Time in seconds the data plane should cache this result.
          type: integer
        consumer:
          $ref: "#/components/schemas/ConsumerIdentity"
      required:
        - principal
        - ttl_secs
```
