> ## 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 record type metadata

> Returns detailed metadata for a specific record type, including relationships and examples.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/session-analysis.yml get /session_analysis/metadata/{record_type}
openapi: 3.1.0
info:
  title: Telnyx Session Analysis API
  version: 2.0.0
  description: API for Session Analysis.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /session_analysis/metadata/{record_type}:
    get:
      tags:
        - Session Analysis
      summary: Get record type metadata
      description: >-
        Returns detailed metadata for a specific record type, including
        relationships and examples.
      operationId: GetSessionAnalysisRecordTypeMetadata
      parameters:
        - name: record_type
          in: path
          required: true
          description: The record type identifier (e.g. "call-control").
          schema:
            type: string
      responses:
        '200':
          description: Record type metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordTypeMetadataResponse'
        '404':
          description: Record type not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionAnalysisErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionAnalysisErrorResponse'
      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.sessionAnalysis.metadata.retrieveRecordType('record_type');


            console.log(response.aliases);
        - 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.session_analysis.metadata.retrieve_record_type(
                "record_type",
            )
            print(response.aliases)
        - 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.SessionAnalysis.Metadata.GetRecordType(context.TODO(), \"record_type\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Aliases)\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.sessionanalysis.metadata.MetadataRetrieveRecordTypeParams;

            import
            com.telnyx.sdk.models.sessionanalysis.metadata.MetadataRetrieveRecordTypeResponse;


            public final class Main {
                private Main() {}

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

                    MetadataRetrieveRecordTypeResponse response = client.sessionAnalysis().metadata().retrieveRecordType("record_type");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.session_analysis.metadata.retrieve_record_type("record_type")


            puts(response)
        - lang: CLI
          source: |-
            telnyx session-analysis:metadata retrieve-record-type \
              --api-key 'My API Key' \
              --record-type record_type
components:
  schemas:
    RecordTypeMetadataResponse:
      type: object
      required:
        - record_type
        - aliases
        - product
        - event
        - child_relationships
        - parent_relationships
        - examples
        - meta
      properties:
        record_type:
          type: string
        aliases:
          type: array
          items:
            type: string
        product:
          type: string
        event:
          type: string
        child_relationships:
          type: array
          items:
            $ref: '#/components/schemas/ChildRelationshipInfo'
        parent_relationships:
          type: array
          items:
            $ref: '#/components/schemas/ParentRelationshipInfo'
        examples:
          type: object
          additionalProperties: true
          description: Example queries and responses for this record type.
        meta:
          $ref: '#/components/schemas/RelationshipMetadata'
    SessionAnalysisErrorResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/SessionAnalysisError'
    ChildRelationshipInfo:
      type: object
      required:
        - relationship_type
        - via
        - cost_rollup
        - traversal_enabled
        - description
        - child_product
        - child_event
        - child_record_type
      properties:
        relationship_type:
          type: string
        via:
          $ref: '#/components/schemas/MetadataFieldMapping'
        cost_rollup:
          type: boolean
        traversal_enabled:
          type: boolean
        description:
          type: string
        child_product:
          type: string
        child_event:
          type: string
        child_record_type:
          type: string
    ParentRelationshipInfo:
      type: object
      required:
        - relationship_type
        - via
        - cost_rollup
        - traversal_enabled
        - description
        - parent_product
        - parent_event
        - parent_record_type
      properties:
        relationship_type:
          type: string
        via:
          $ref: '#/components/schemas/MetadataFieldMapping'
        cost_rollup:
          type: boolean
        traversal_enabled:
          type: boolean
        description:
          type: string
        parent_product:
          type: string
        parent_event:
          type: string
        parent_record_type:
          type: string
    RelationshipMetadata:
      type: object
      required:
        - total_children
        - total_siblings
        - total_parents
        - max_recommended_depth
      properties:
        total_children:
          type: integer
        total_siblings:
          type: integer
        total_parents:
          type: integer
        max_recommended_depth:
          type: integer
    SessionAnalysisError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        detail:
          type: string
    MetadataFieldMapping:
      type: object
      required:
        - local_field
        - parent_field
      properties:
        local_field:
          type: string
        parent_field:
          type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````