> ## Documentation Index
> Fetch the complete documentation index at: https://confidence.spotify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deriveevaluationcontextschema Client

> Infer the schema of the evaluation context for a specific set of clients,
 that has previously been used to resolve one or more flags.



## OpenAPI

````yaml /api/flags/api/flag.openapi.json post /v1/clientEvaluationContextSchema:derive
openapi: 3.1.0
info:
  title: Confidence Flag API
  version: 1.0.0
  description: API documentation for flag
servers: []
security: []
paths:
  /v1/clientEvaluationContextSchema:derive:
    post:
      summary: Deriveevaluationcontextschema Client
      description: >-
        Infer the schema of the evaluation context for a specific set of
        clients,
         that has previously been used to resolve one or more flags.
      operationId: Client.deriveevaluationcontextschema
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                clients:
                  type: array
                  items:
                    type: string
                  description: >-
                    The list of clients to infer the schema for. If empty,
                    returns schema for
                     all clients that the caller has permissions to.
                mustMatchSchema:
                  type: object
                  properties:
                    schema:
                      type: array
                      items:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            types:
                              type: array
                              items:
                                type: string
                                enum:
                                  - KIND_UNSPECIFIED
                                  - NULL_KIND
                                  - NUMBER_KIND
                                  - STRING_KIND
                                  - BOOL_KIND
                              description: The observed types.
                            displayName:
                              type: string
                              description: Human friendly name of the field
                            hidden:
                              type: boolean
                              description: If the field should be visible or not
                            semanticType:
                              type: object
                              properties:
                                country:
                                  type: object
                                  properties:
                                    format:
                                      type: string
                                      enum:
                                        - COUNTRY_FORMAT_UNSPECIFIED
                                        - TWO_LETTER_ISO_CODE
                                      description: What format the country is specified in.
                                  required:
                                    - format
                                  description: |2-

                                     If this is a country type, this specifies in what format.
                                enumType:
                                  type: object
                                  properties:
                                    values:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          value:
                                            type: string
                                            description: A possible value the enum can take.
                                      description: What allowed values exist for this enum.
                                  required:
                                    - values
                                  description: >-
                                    If this is an enum this specifies what value
                                    it has etc.
                                entityReference:
                                  type: object
                                  properties:
                                    entity:
                                      type: string
                                      description: >-
                                        A reference to the entity that exists in
                                        this field.-
                                  required:
                                    - entity
                                  description: If this field is a reference to an entity.
                                version:
                                  type: object
                                  description: If this field is a semantic type.
                                date:
                                  type: object
                                  description: |2-

                                     If this field is a date.
                                timestamp:
                                  type: object
                                  description: |2-

                                     If this field is a timestamp.
                              description: >-
                                Semantic type of a field. Makes it possible to
                                narrow the number of possible values for a field
                                etc.
                            seenValues:
                              type: array
                              items:
                                type: object
                                properties:
                                  nullValue:
                                    type: string
                                    enum:
                                      - NULL_VALUE
                                    description: Represents a null value.
                                  numberValue:
                                    type: number
                                    description: Represents a double value.
                                  stringValue:
                                    type: string
                                    description: Represents a string value.
                                  boolValue:
                                    type: boolean
                                    description: Represents a boolean value.
                                  structValue:
                                    type: object
                                    description: Represents a structured value.
                                  listValue:
                                    type: object
                                    properties:
                                      values:
                                        type: array
                                        items:
                                          type: object
                                        description: >-
                                          Repeated field of dynamically typed
                                          values.
                                    description: Represents a repeated `Value`.
                              description: Sample of values seen for this field.
                      description: Schema of each field in the evaluation context.
                  description: >-
                    Filter the available options by finding only options that
                    can be used in combination with this existing schema.
                     For instance if field `country` is selected, only find schemas where `country` exists.
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  clientSchema:
                    type: array
                    items:
                      type: object
                      properties:
                        client:
                          type: string
                          description: Resource reference to a client.
                        schema:
                          type: object
                          properties:
                            schema:
                              type: array
                              items:
                                type: object
                                additionalProperties:
                                  type: object
                                  properties:
                                    types:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - KIND_UNSPECIFIED
                                          - NULL_KIND
                                          - NUMBER_KIND
                                          - STRING_KIND
                                          - BOOL_KIND
                                      description: The observed types.
                                    displayName:
                                      type: string
                                      description: Human friendly name of the field
                                    hidden:
                                      type: boolean
                                      description: If the field should be visible or not
                                    semanticType:
                                      type: object
                                      properties:
                                        country:
                                          type: object
                                          properties:
                                            format:
                                              type: string
                                              enum:
                                                - COUNTRY_FORMAT_UNSPECIFIED
                                                - TWO_LETTER_ISO_CODE
                                              description: What format the country is specified in.
                                          required:
                                            - format
                                          description: |2-

                                             If this is a country type, this specifies in what format.
                                        enumType:
                                          type: object
                                          properties:
                                            values:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  value:
                                                    type: string
                                                    description: A possible value the enum can take.
                                              description: What allowed values exist for this enum.
                                          required:
                                            - values
                                          description: >-
                                            If this is an enum this specifies what
                                            value it has etc.
                                        entityReference:
                                          type: object
                                          properties:
                                            entity:
                                              type: string
                                              description: >-
                                                A reference to the entity that exists in
                                                this field.-
                                          required:
                                            - entity
                                          description: >-
                                            If this field is a reference to an
                                            entity.
                                        version:
                                          type: object
                                          description: If this field is a semantic type.
                                        date:
                                          type: object
                                          description: |2-

                                             If this field is a date.
                                        timestamp:
                                          type: object
                                          description: |2-

                                             If this field is a timestamp.
                                      description: >-
                                        Semantic type of a field. Makes it
                                        possible to narrow the number of
                                        possible values for a field etc.
                                    seenValues:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          nullValue:
                                            type: string
                                            enum:
                                              - NULL_VALUE
                                            description: Represents a null value.
                                          numberValue:
                                            type: number
                                            description: Represents a double value.
                                          stringValue:
                                            type: string
                                            description: Represents a string value.
                                          boolValue:
                                            type: boolean
                                            description: Represents a boolean value.
                                          structValue:
                                            type: object
                                            description: Represents a structured value.
                                          listValue:
                                            type: object
                                            properties:
                                              values:
                                                type: array
                                                items:
                                                  type: object
                                                description: >-
                                                  Repeated field of dynamically typed
                                                  values.
                                            description: Represents a repeated `Value`.
                                      description: Sample of values seen for this field.
                              description: Schema of each field in the evaluation context.
                          description: The evaluation context schema of the client.
                      required:
                        - client
                    description: The client specific derived schemas.
                  mergedSchema:
                    type: object
                    properties:
                      schema:
                        type: array
                        items:
                          type: object
                          additionalProperties:
                            type: object
                            properties:
                              types:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - KIND_UNSPECIFIED
                                    - NULL_KIND
                                    - NUMBER_KIND
                                    - STRING_KIND
                                    - BOOL_KIND
                                description: The observed types.
                              displayName:
                                type: string
                                description: Human friendly name of the field
                              hidden:
                                type: boolean
                                description: If the field should be visible or not
                              semanticType:
                                type: object
                                properties:
                                  country:
                                    type: object
                                    properties:
                                      format:
                                        type: string
                                        enum:
                                          - COUNTRY_FORMAT_UNSPECIFIED
                                          - TWO_LETTER_ISO_CODE
                                        description: What format the country is specified in.
                                    required:
                                      - format
                                    description: |2-

                                       If this is a country type, this specifies in what format.
                                  enumType:
                                    type: object
                                    properties:
                                      values:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            value:
                                              type: string
                                              description: A possible value the enum can take.
                                        description: What allowed values exist for this enum.
                                    required:
                                      - values
                                    description: >-
                                      If this is an enum this specifies what
                                      value it has etc.
                                  entityReference:
                                    type: object
                                    properties:
                                      entity:
                                        type: string
                                        description: >-
                                          A reference to the entity that exists in
                                          this field.-
                                    required:
                                      - entity
                                    description: If this field is a reference to an entity.
                                  version:
                                    type: object
                                    description: If this field is a semantic type.
                                  date:
                                    type: object
                                    description: |2-

                                       If this field is a date.
                                  timestamp:
                                    type: object
                                    description: |2-

                                       If this field is a timestamp.
                                description: >-
                                  Semantic type of a field. Makes it possible to
                                  narrow the number of possible values for a
                                  field etc.
                              seenValues:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    nullValue:
                                      type: string
                                      enum:
                                        - NULL_VALUE
                                      description: Represents a null value.
                                    numberValue:
                                      type: number
                                      description: Represents a double value.
                                    stringValue:
                                      type: string
                                      description: Represents a string value.
                                    boolValue:
                                      type: boolean
                                      description: Represents a boolean value.
                                    structValue:
                                      type: object
                                      description: Represents a structured value.
                                    listValue:
                                      type: object
                                      properties:
                                        values:
                                          type: array
                                          items:
                                            type: object
                                          description: >-
                                            Repeated field of dynamically typed
                                            values.
                                      description: Represents a repeated `Value`.
                                description: Sample of values seen for this field.
                        description: Schema of each field in the evaluation context.
                    description: The schema created by merging the schema from all clients.
                  capped:
                    type: boolean
                    description: >-
                      True if the number of schema entries exceeded the
                      processing limit and the result may be incomplete.
                       Use evaluation context field overrides to manually define missing fields.
      security:
        - admin: []
      servers:
        - url: https://flags.eu.confidence.dev
        - url: https://flags.us.confidence.dev
        - url: https://flags.confidence.dev
components:
  securitySchemes:
    admin:
      type: http
      scheme: bearer

````