Get record type metadata
Returns detailed metadata for a specific record type, including relationships and examples.
GET
/
session_analysis
/
metadata
/
{record_type}
JavaScript
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);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)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.SessionAnalysis.Metadata.GetRecordType(context.TODO(), "record_type")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Aliases)
}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");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.session_analysis.metadata.retrieve_record_type("record_type")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->sessionAnalysis->metadata->retrieveRecordType(
'record_type'
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx session-analysis:metadata retrieve-record-type \
--api-key 'My API Key' \
--record-type record_typecurl --request GET \
--url https://api.telnyx.com/v2/session_analysis/metadata/{record_type} \
--header 'Authorization: Bearer <token>'{
"record_type": "<string>",
"aliases": [
"<string>"
],
"product": "<string>",
"event": "<string>",
"child_relationships": [
{
"relationship_type": "<string>",
"via": {
"local_field": "<string>",
"parent_field": "<string>"
},
"cost_rollup": true,
"traversal_enabled": true,
"description": "<string>",
"child_product": "<string>",
"child_event": "<string>",
"child_record_type": "<string>"
}
],
"parent_relationships": [
{
"relationship_type": "<string>",
"via": {
"local_field": "<string>",
"parent_field": "<string>"
},
"cost_rollup": true,
"traversal_enabled": true,
"description": "<string>",
"parent_product": "<string>",
"parent_event": "<string>",
"parent_record_type": "<string>"
}
],
"examples": {},
"meta": {
"total_children": 123,
"total_siblings": 123,
"total_parents": 123,
"max_recommended_depth": 123
}
}{
"errors": [
{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The record type identifier (e.g. "call-control").
Response
Record type metadata
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example queries and responses for this record type.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
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);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)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.SessionAnalysis.Metadata.GetRecordType(context.TODO(), "record_type")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Aliases)
}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");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.session_analysis.metadata.retrieve_record_type("record_type")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->sessionAnalysis->metadata->retrieveRecordType(
'record_type'
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx session-analysis:metadata retrieve-record-type \
--api-key 'My API Key' \
--record-type record_typecurl --request GET \
--url https://api.telnyx.com/v2/session_analysis/metadata/{record_type} \
--header 'Authorization: Bearer <token>'{
"record_type": "<string>",
"aliases": [
"<string>"
],
"product": "<string>",
"event": "<string>",
"child_relationships": [
{
"relationship_type": "<string>",
"via": {
"local_field": "<string>",
"parent_field": "<string>"
},
"cost_rollup": true,
"traversal_enabled": true,
"description": "<string>",
"child_product": "<string>",
"child_event": "<string>",
"child_record_type": "<string>"
}
],
"parent_relationships": [
{
"relationship_type": "<string>",
"via": {
"local_field": "<string>",
"parent_field": "<string>"
},
"cost_rollup": true,
"traversal_enabled": true,
"description": "<string>",
"parent_product": "<string>",
"parent_event": "<string>",
"parent_record_type": "<string>"
}
],
"examples": {},
"meta": {
"total_children": 123,
"total_siblings": 123,
"total_parents": 123,
"max_recommended_depth": 123
}
}{
"errors": [
{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"message": "<string>",
"detail": "<string>"
}
]
}