Aggregate traces
Aggregate trace metrics using the structured trace filter contract.
POST
/
v2
/
traces
/
aggregate
Aggregate traces
curl --request POST \
--url https://api.orq.ai/v2/traces/aggregate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": [
"<string>"
]
}
],
"group_by": [
"<string>"
],
"compute": [
{
"metric": "<string>",
"op": "<string>"
}
],
"limit": 123,
"filter_operator": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
filters: [{field: '<string>', op: '<string>', values: ['<string>']}],
group_by: ['<string>'],
compute: [{metric: '<string>', op: '<string>'}],
limit: 123,
filter_operator: '<string>'
})
};
fetch('https://api.orq.ai/v2/traces/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.orq.ai/v2/traces/aggregate"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": ["<string>"]
}
],
"group_by": ["<string>"],
"compute": [
{
"metric": "<string>",
"op": "<string>"
}
],
"limit": 123,
"filter_operator": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "<string>",
"data": [
{
"group": {},
"metrics": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?
⌘I
Aggregate traces
curl --request POST \
--url https://api.orq.ai/v2/traces/aggregate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": [
"<string>"
]
}
],
"group_by": [
"<string>"
],
"compute": [
{
"metric": "<string>",
"op": "<string>"
}
],
"limit": 123,
"filter_operator": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
filters: [{field: '<string>', op: '<string>', values: ['<string>']}],
group_by: ['<string>'],
compute: [{metric: '<string>', op: '<string>'}],
limit: 123,
filter_operator: '<string>'
})
};
fetch('https://api.orq.ai/v2/traces/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.orq.ai/v2/traces/aggregate"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": ["<string>"]
}
],
"group_by": ["<string>"],
"compute": [
{
"metric": "<string>",
"op": "<string>"
}
],
"limit": 123,
"filter_operator": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "<string>",
"data": [
{
"group": {},
"metrics": {}
}
]
}