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

# Get Usage Reports query options (BETA)

> Get the Usage Reports options for querying usage, including the products available and their respective metrics and dimensions



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/usage-reports.yml get /usage_reports/options
openapi: 3.1.0
info:
  title: Telnyx Usage Reports API
  version: 2.0.0
  description: API for Usage reports.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /usage_reports/options:
    get:
      tags:
        - Usage Reports (BETA)
      summary: Get Usage Reports query options (BETA)
      description: >-
        Get the Usage Reports options for querying usage, including the products
        available and their respective metrics and dimensions
      operationId: ListUsageReportsOptions
      parameters:
        - name: product
          in: query
          description: >-
            Options (dimensions and metrics) for a given product. If none
            specified, all products will be returned.
          required: false
          schema:
            type: string
          examples:
            product=wireless:
              value: wireless
              summary: Specify a product if you know what you're looking for
        - name: authorization_bearer
          in: header
          schema:
            type: string
            description: Authenticates the request with your Telnyx API V2 KEY
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageReportsOptionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/usage-reports_ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/usage-reports_ErrorResponse'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.usageReports.getOptions();

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.usage_reports.get_options()
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.UsageReports.GetOptions(context.TODO(), telnyx.UsageReportGetOptionsParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.usagereports.UsageReportGetOptionsParams;

            import
            com.telnyx.sdk.models.usagereports.UsageReportGetOptionsResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    UsageReportGetOptionsResponse response = client.usageReports().getOptions();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.usage_reports.get_options

            puts(response)
        - lang: CLI
          source: |-
            telnyx usage-reports get-options \
              --api-key 'My API Key'
components:
  schemas:
    UsageReportsOptionsResponse:
      type: object
      description: >-
        An object following one of the schemas published in
        https://developers.telnyx.com/docs/api/v2/detail-records
      properties:
        data:
          type: array
          description: Collection of product description
          items:
            $ref: '#/components/schemas/UsageReportsOptionsRecord'
    usage-reports_ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorRecord'
    UsageReportsOptionsRecord:
      type: object
      description: >-
        An object following one of the schemas published in
        https://developers.telnyx.com/docs/api/v2/detail-records
      properties:
        product:
          type: string
          description: Telnyx Product
          example: wireless
        product_dimensions:
          type: array
          description: Telnyx Product Dimensions
          example:
            - mnc
            - mcc
            - sim_card_id
            - sim_group_name
          items:
            type: string
        product_metrics:
          type: array
          description: Telnyx Product Metrics
          example:
            - uplink_data_bytes
            - downlink_data
            - downlink_data_bytes
            - uplink_data
            - data_cost
          items:
            type: string
        record_types:
          type: array
          description: Subproducts if applicable
          items:
            $ref: '#/components/schemas/usage-reports_RecordType'
    ErrorRecord:
      type: object
      properties:
        code:
          type: string
          description: >-
            an application-specific error code, expressed as a stringified
            5-digit integer
          example: '10003'
        title:
          type: string
          description: >-
            a short, human-readable summary of the problem, with NO punctuation,
            that SHOULD NOT CHANGE from occurrence to occurrence of the problem,
            except for purposes of localization
          example: Metrics invalid values
        detail:
          type: string
          description: >-
            a human-readable explanation specific to this occurrence of the
            problem. Like title, this field’s value can be localized
          example: >-
            Available metrics values for sip-trunking:
            connected,cost,completed,call_sec,attempted,billed_sec.
        source:
          $ref: '#/components/schemas/SourceResponse'
        meta:
          $ref: '#/components/schemas/MetaResponse'
    usage-reports_RecordType:
      type: object
      description: >-
        An object following one of the schemas published in
        https://developers.telnyx.com/docs/api/v2/detail-records
      properties:
        record_type:
          type: string
          description: Telnyx Product type
          example: conversation_event
        product_dimensions:
          type: array
          description: Telnyx Product Dimensions
          example:
            - direction
            - currency
            - message_type
          items:
            type: string
        product_metrics:
          type: array
          description: Telnyx Product Metrics
          example:
            - cost
            - billed_sec
          items:
            type: string
    SourceResponse:
      type: object
      properties:
        pointer:
          type: string
          description: >-
            A JSON Pointer [RFC6901] to the associated entity in the request
            document
          example: /title
        parameter:
          type: string
          description: a string indicating which URI query parameter caused the error
          example: metrics
    MetaResponse:
      type: object
      properties:
        url:
          type: string
          description: This should likely be a URL to the relevant documentation
          example: https://developers.telnyx.com/docs/overview/errors/10001
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````