List query templates
curl --request GET \
--url https://app.chatobserver.com/api/v2/metrics/templates \
--header 'x-chatobserver-key: <api-key>'const options = {method: 'GET', headers: {'x-chatobserver-key': '<api-key>'}};
fetch('https://app.chatobserver.com/api/v2/metrics/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.chatobserver.com/api/v2/metrics/templates"
headers = {"x-chatobserver-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"name": "<string>",
"id": "<string>",
"description": "<string>",
"suggested": false,
"connectorKey": "<string>",
"fields": [
{
"role": "metric",
"fieldId": "<string>"
}
],
"queryType": "<string>",
"dateRangeDays": 123,
"outputMode": "replace"
}
]
}{
"error": {
"code": "internal",
"fieldPath": [
"<string>"
],
"parameters": {},
"repairActions": [
"<string>"
],
"requestId": "<string>",
"retryable": false,
"retryAfterSeconds": 1
}
}Data definitions
List query templates
Manage reusable definitions and their immutable versions.
GET
/
api
/
v2
/
metrics
/
templates
List query templates
curl --request GET \
--url https://app.chatobserver.com/api/v2/metrics/templates \
--header 'x-chatobserver-key: <api-key>'const options = {method: 'GET', headers: {'x-chatobserver-key': '<api-key>'}};
fetch('https://app.chatobserver.com/api/v2/metrics/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.chatobserver.com/api/v2/metrics/templates"
headers = {"x-chatobserver-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"name": "<string>",
"id": "<string>",
"description": "<string>",
"suggested": false,
"connectorKey": "<string>",
"fields": [
{
"role": "metric",
"fieldId": "<string>"
}
],
"queryType": "<string>",
"dateRangeDays": 123,
"outputMode": "replace"
}
]
}{
"error": {
"code": "internal",
"fieldPath": [
"<string>"
],
"parameters": {},
"repairActions": [
"<string>"
],
"requestId": "<string>",
"retryable": false,
"retryAfterSeconds": 1
}
}