curl --request POST \
--url https://api.avidoai.com/v0/reporting/query \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-application-id: <api-key>' \
--data '
{
"datasource": "task"
}
'{
"data": {
"datasource": "task",
"columns": [
{
"id": "id",
"name": "Task ID",
"type": "string"
},
{
"id": "orgId",
"name": "Organization ID",
"type": "string"
},
{
"id": "title",
"name": "Title",
"type": "string"
},
{
"id": "type",
"name": "Task Type",
"type": "string"
},
{
"id": "topicId",
"name": "Topic",
"type": "string"
},
{
"id": "createdAt",
"name": "Created Date",
"type": "date"
}
],
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"orgId": "org_123456",
"title": "Example Task",
"type": "STATIC",
"topicId": {
"id": "topic-uuid-123",
"name": "Authentication"
},
"createdAt": "2024-01-05T12:34:56.789Z"
}
],
"visualization": {
"compatibleCharts": [
"table"
],
"recommendedChart": "table",
"fieldMapping": {
"measures": []
}
}
},
"pagination": {
"skip": 0,
"limit": 25,
"total": 1,
"totalPages": 1
}
}Query reporting data
Queries reporting data from specified datasources with optional filters and groupBy clauses. Supports aggregation and date truncation for time-based grouping.
curl --request POST \
--url https://api.avidoai.com/v0/reporting/query \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-application-id: <api-key>' \
--data '
{
"datasource": "task"
}
'{
"data": {
"datasource": "task",
"columns": [
{
"id": "id",
"name": "Task ID",
"type": "string"
},
{
"id": "orgId",
"name": "Organization ID",
"type": "string"
},
{
"id": "title",
"name": "Title",
"type": "string"
},
{
"id": "type",
"name": "Task Type",
"type": "string"
},
{
"id": "topicId",
"name": "Topic",
"type": "string"
},
{
"id": "createdAt",
"name": "Created Date",
"type": "date"
}
],
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"orgId": "org_123456",
"title": "Example Task",
"type": "STATIC",
"topicId": {
"id": "topic-uuid-123",
"name": "Authentication"
},
"createdAt": "2024-01-05T12:34:56.789Z"
}
],
"visualization": {
"compatibleCharts": [
"table"
],
"recommendedChart": "table",
"fieldMapping": {
"measures": []
}
}
},
"pagination": {
"skip": 0,
"limit": 25,
"total": 1,
"totalPages": 1
}
}Authorizations
Your unique Avido API key
Your unique Avido Application ID
Body
Request body for querying reporting data
Datasource to query
task, test, eval, topic, tag, human_annotation "task"
IANA timezone identifier for date filter resolution (e.g., 'America/New_York', 'Europe/London', 'UTC')
"America/New_York"
Number of items to skip before starting to collect the result set.
0 <= x <= 90071992547409910
Number of items to include in the result set.
1 <= x <= 10025
Optional filters to apply to the query. Each filter must specify a type (string/number/boolean/date) that matches the column type.
Filter for string columns using eq/neq operators
- ReportingQueryStringFilter
- ReportingQueryNumberFilter
- ReportingQueryBooleanFilter
- ReportingQueryDateFilter
Show child attributes
Show child attributes
[
{
"type": "string",
"column": "type",
"operator": "eq",
"value": ["STATIC"]
}
]
Optional group by clauses for aggregating results. For date columns, dateTrunc is required.
Group by specification for non-date columns
- ReportingQueryGroupByBase
- ReportingQueryGroupByDate
Show child attributes
Show child attributes
[
{ "column": "type", "type": "string" },
{
"column": "createdAt",
"type": "date",
"dateTrunc": "month"
}
]
Optional measurements/aggregations to compute when using groupBy. Defaults to count if not specified. Use avg/sum/min/max for numeric or boolean columns.
Show child attributes
Show child attributes
[
{ "type": "count" },
{ "type": "avg", "column": "score" }
]
Optional ordering specification. If not specified, defaults to ordering by all groupBy columns (with createdAt priority) then measurements. For non-groupBy queries, defaults to createdAt DESC, id DESC.
Show child attributes
Show child attributes
[
{
"column": "createdAt",
"direction": "desc"
},
{ "column": "count", "direction": "asc" }
]
When true, includes archived entities (tasks, topics, tags) in the query results. Defaults to false, which filters out archived data.
false