> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-mintlify-9d6f9427.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get segment dimensions

> Get dimensions that can be used to segment metrics



## OpenAPI

````yaml https://raw.githubusercontent.com/lightdash/lightdash/refs/heads/main/packages/backend/src/generated/swagger.json get /api/v1/projects/{projectUuid}/dataCatalog/{tableName}/segment-dimensions
openapi: 3.0.0
info:
  title: Lightdash API
  version: 0.3249.0
  description: >
    Open API documentation for all public Lightdash API endpoints. #
    Authentication Before you get started, you might need to create a Personal
    Access Token to authenticate via the API. You can create a token by
    following this guide: https://docs.lightdash.com/references/personal_tokens
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
  - url: /
security: []
tags:
  - name: My Account
    description: These routes allow users to manage their own user account.
  - name: Organizations
    description: >-
      Each user is a member of a single organization. These routes allow users
      to manage their organization. Most actions are only available to admin
      users.
  - name: Projects
    description: >-
      Projects belong to a single organization. These routes allow users to
      manage their projects, browse content, and execute queries. Users inside
      an organization might have access to a project from an organization-level
      role or they might be granted access to a project directly.
  - name: Spaces
    description: >-
      Spaces allow you to organize charts and dashboards within a project. They
      also allow granular access to content by allowing you to create private
      spaces, which are only accessible to the creator and admins.
  - name: Roles & Permissions
    description: >-
      These routes allow users to manage roles and permissions for their
      organization.
    externalDocs:
      url: https://docs.lightdash.com/references/roles
  - name: Query
    description: >-
      These routes allow users to execute and manage queries against their data
      warehouse. This includes metric queries, SQL queries, and retrieving query
      results.
paths:
  /api/v1/projects/{projectUuid}/dataCatalog/{tableName}/segment-dimensions:
    get:
      tags:
        - Catalog
      summary: Get segment dimensions
      description: Get dimensions that can be used to segment metrics
      operationId: getSegmentDimensions
      parameters:
        - in: path
          name: projectUuid
          required: true
          schema:
            type: string
        - in: path
          name: tableName
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSegmentDimensionsResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      security: []
components:
  schemas:
    ApiSegmentDimensionsResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/CompiledDimension'
          type: array
        status:
          type: string
          enum:
            - ok
          nullable: false
      required:
        - results
        - status
      type: object
    ApiErrorPayload:
      properties:
        error:
          properties:
            data:
              $ref: '#/components/schemas/AnyType'
              description: Optional data containing details of the error
            message:
              type: string
              description: A friendly message summarising the error
            name:
              type: string
              description: Unique name for the type of error
            statusCode:
              type: number
              format: integer
              description: HTTP status code
          required:
            - name
            - statusCode
          type: object
        status:
          type: string
          enum:
            - error
          nullable: false
      required:
        - error
        - status
      type: object
      description: |-
        The Error object is returned from the api any time there is an error.
        The message contains
    CompiledDimension:
      allOf:
        - $ref: '#/components/schemas/Dimension'
        - $ref: '#/components/schemas/CompiledProperties'
    AnyType:
      description: |-
        This AnyType is an alias for any
        The goal is to make it easier to identify any type in the codebase
        without having to eslint-disable all the time
        These are only used on legacy `any` types, don't use it for new types.
        This is added on a separate file to avoid circular dependencies.
    Dimension:
      properties:
        fieldType:
          $ref: '#/components/schemas/FieldType.DIMENSION'
        type:
          $ref: '#/components/schemas/DimensionType'
        name:
          type: string
        label:
          type: string
        table:
          type: string
        tableLabel:
          type: string
        sql:
          type: string
        description:
          type: string
        source:
          $ref: '#/components/schemas/Source'
        hidden:
          type: boolean
        compact:
          $ref: '#/components/schemas/CompactOrAlias'
        round:
          type: number
          format: double
        format:
          anyOf:
            - $ref: '#/components/schemas/Format'
            - type: string
        separator:
          $ref: '#/components/schemas/NumberSeparator'
          description: >-
            Number separator style for grouping/decimal characters. Composes
            with

            `format` (including ECMA-376 expressions) and `formatOptions` — it
            only

            controls the separator characters, not the format shape.
        groupLabel:
          type: string
          deprecated: true
        groups:
          items:
            type: string
          type: array
        urls:
          items:
            $ref: '#/components/schemas/FieldUrl'
          type: array
        index:
          type: number
          format: double
        tags:
          items:
            type: string
          type: array
        parameterReferences:
          items:
            type: string
          type: array
        group:
          type: string
          deprecated: true
        requiredAttributes:
          $ref: '#/components/schemas/Record_string.string-or-string-Array_'
        anyAttributes:
          $ref: '#/components/schemas/Record_string.string-or-string-Array_'
        timeInterval:
          $ref: '#/components/schemas/TimeFrames'
        timeIntervalBaseDimensionName:
          type: string
        timeIntervalBaseDimensionType:
          $ref: '#/components/schemas/DimensionType'
        customTimeInterval:
          type: string
        isAdditionalDimension:
          type: boolean
        skipTimezoneConversion:
          type: boolean
        colors:
          $ref: '#/components/schemas/Record_string.string_'
        isIntervalBase:
          type: boolean
        aiHint:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
        formatOptions:
          $ref: '#/components/schemas/CustomFormat'
        caseSensitive:
          type: boolean
        image:
          properties:
            fit:
              type: string
            height:
              type: number
              format: double
            width:
              type: number
              format: double
            url:
              type: string
          required:
            - url
          type: object
        richText:
          type: string
        spotlight:
          properties:
            segmentBy:
              type: boolean
            filterBy:
              type: boolean
          type: object
      required:
        - fieldType
        - type
        - name
        - label
        - table
        - tableLabel
        - sql
        - hidden
      type: object
      additionalProperties: true
    CompiledProperties:
      properties:
        compiledRelativeDateFilters:
          items:
            $ref: '#/components/schemas/CompiledMetricRelativeDateFilter'
          type: array
        compiledDistinctKeys:
          items:
            type: string
          type: array
        compiledValueSql:
          type: string
        compilationError:
          $ref: '#/components/schemas/FieldCompilationError'
          description: >-
            When partial compilation mode is enabled, fields that fail to
            compile

            will have this property set instead of causing the entire explore to
            fail.
        tablesAnyAttributes:
          $ref: >-
            #/components/schemas/Record_string.Record_string.string-or-string-Array__
        tablesRequiredAttributes:
          $ref: >-
            #/components/schemas/Record_string.Record_string.string-or-string-Array__
        tablesReferences:
          items:
            type: string
          type: array
        compiledSql:
          type: string
      required:
        - compiledSql
      type: object
    FieldType.DIMENSION:
      enum:
        - dimension
      type: string
    DimensionType:
      enum:
        - string
        - number
        - timestamp
        - date
        - boolean
      type: string
    Source:
      properties:
        content:
          type: string
        highlight:
          properties:
            end:
              $ref: '#/components/schemas/SourcePosition'
            start:
              $ref: '#/components/schemas/SourcePosition'
          required:
            - end
            - start
          type: object
        range:
          properties:
            end:
              $ref: '#/components/schemas/SourcePosition'
            start:
              $ref: '#/components/schemas/SourcePosition'
          required:
            - end
            - start
          type: object
        path:
          type: string
      required:
        - content
        - range
        - path
      type: object
    CompactOrAlias:
      anyOf:
        - $ref: '#/components/schemas/Compact'
        - type: string
          enum:
            - K
            - thousand
            - M
            - million
            - B
            - billion
            - T
            - trillion
            - KB
            - kilobyte
            - MB
            - megabyte
            - GB
            - gigabyte
            - TB
            - terabyte
            - PB
            - petabyte
            - KiB
            - kibibyte
            - MiB
            - mebibyte
            - GiB
            - gibibyte
            - TiB
            - tebibyte
            - PiB
            - pebibyte
    Format:
      enum:
        - km
        - mi
        - usd
        - gbp
        - eur
        - jpy
        - dkk
        - id
        - percent
      type: string
    NumberSeparator:
      enum:
        - default
        - commaPeriod
        - spacePeriod
        - periodComma
        - noSeparatorPeriod
        - apostrophePeriod
      type: string
    FieldUrl:
      properties:
        label:
          type: string
        url:
          type: string
      required:
        - label
        - url
      type: object
    Record_string.string-or-string-Array_:
      properties: {}
      additionalProperties:
        anyOf:
          - type: string
          - items:
              type: string
            type: array
      type: object
      description: Construct a type with a set of properties K of type T
    TimeFrames:
      enum:
        - RAW
        - YEAR
        - QUARTER
        - MONTH
        - WEEK
        - DAY
        - HOUR
        - MINUTE
        - SECOND
        - MILLISECOND
        - DAY_OF_WEEK_INDEX
        - DAY_OF_MONTH_NUM
        - DAY_OF_YEAR_NUM
        - WEEK_NUM
        - MONTH_NUM
        - QUARTER_NUM
        - YEAR_NUM
        - DAY_OF_WEEK_NAME
        - MONTH_NAME
        - QUARTER_NAME
        - HOUR_OF_DAY_NUM
        - MINUTE_OF_HOUR_NUM
      type: string
    Record_string.string_:
      properties: {}
      additionalProperties:
        type: string
      type: object
      description: Construct a type with a set of properties K of type T
    CustomFormat:
      properties:
        type:
          $ref: '#/components/schemas/CustomFormatType'
          description: Format type
        round:
          type: number
          format: double
          description: Number of decimal places
        separator:
          $ref: '#/components/schemas/NumberSeparator'
          description: Number separator style
        currency:
          type: string
          description: Currency code (e.g., USD, GBP, EUR)
        compact:
          $ref: '#/components/schemas/CompactOrAlias'
          description: Compact format for large numbers (K, M, B, T) or byte units
        prefix:
          type: string
          description: Prefix to prepend to formatted values
        suffix:
          type: string
          description: Suffix to append to formatted values
        timeInterval:
          $ref: '#/components/schemas/TimeFrames'
          description: Time interval for date formatting
        custom:
          type: string
          description: Custom format string
      required:
        - type
      type: object
      additionalProperties: true
    CompiledMetricRelativeDateFilter:
      properties:
        compiledSql:
          type: string
        fieldId:
          type: string
        id:
          type: string
      required:
        - compiledSql
        - fieldId
        - id
      type: object
    FieldCompilationError:
      properties:
        message:
          type: string
      required:
        - message
      type: object
      description: |-
        Error information stored on a field when compilation fails but
        partial compilation mode is enabled.
    Record_string.Record_string.string-or-string-Array__:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/Record_string.string-or-string-Array_'
      type: object
      description: Construct a type with a set of properties K of type T
    SourcePosition:
      properties:
        character:
          type: number
          format: double
        line:
          type: number
          format: double
      required:
        - character
        - line
      type: object
    Compact:
      enum:
        - thousands
        - millions
        - billions
        - trillions
        - kilobytes
        - megabytes
        - gigabytes
        - terabytes
        - petabytes
        - kibibytes
        - mebibytes
        - gibibytes
        - tebibytes
        - pebibytes
      type: string
    CustomFormatType:
      enum:
        - default
        - percent
        - currency
        - number
        - id
        - date
        - timestamp
        - bytes_si
        - bytes_iec
        - custom
      type: string

````