> ## 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.

# List Variant

> List all the variants of this flag. The variants are returned in the order
 they were added to the flag.



## OpenAPI

````yaml /api/flags/api/flag.openapi.json get /v1/flags/{flag}/variants
openapi: 3.1.0
info:
  title: Confidence Flag API
  version: 1.0.0
  description: API documentation for flag
servers: []
security: []
paths:
  /v1/flags/{flag}/variants:
    get:
      summary: List Variant
      description: >-
        List all the variants of this flag. The variants are returned in the
        order
         they were added to the flag.
      operationId: Variant.list
      parameters:
        - name: flag
          in: path
          required: true
          schema:
            type: string
        - name: pageSize
          in: query
          required: false
          description: The maximum number of variants to fetch.
          schema:
            type: object
        - name: pageToken
          in: query
          required: false
          description: Token used for pagination.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  variants:
                    type: array
                    items:
                      $ref: >-
                        #/components/schemas/confidence.flags.admin.v1.Flag.Variant
                    description: >-
                      [Flag.Variant](/api-reference/schemas/flag-variant): List
                      of variants.
                  nextPageToken:
                    type: string
                    description: >-
                      A token that can be used to fetch more variants, empty if
                      no more variants
                       are available.
                required:
                  - variants
      security:
        - admin: []
      servers:
        - url: https://flags.eu.confidence.dev
        - url: https://flags.us.confidence.dev
        - url: https://flags.confidence.dev
components:
  schemas:
    confidence.flags.admin.v1.Flag.Variant:
      title: Flag.Variant
      type: object
      description: A possible named value the flag can assign.
      properties:
        name:
          type: string
          description: |-
            The resource name of the variant.
             For example:
             `flags/my-flag/variants/control`
        value:
          type: object
          description: >-
            The value that this variant represents. A possibly nested json
            object.
        labels:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          description: General set of labels for this resource.
        description:
          type: string
          description: A human-friendly description of the variant.
        imageUri:
          type: string
          description: An image URL or path for the variant.
        createTime:
          type: object
          description: Time when the flag was first created.
        updateTime:
          type: object
          description: Time when the flag was last updated.
        creator:
          type: string
          description: Reference to the identity that created this variant.
        updater:
          type: string
          description: Reference to the identity that last updated this variant.
      required:
        - name
        - value
        - createTime
        - updateTime
        - creator
        - updater
  securitySchemes:
    admin:
      type: http
      scheme: bearer

````