Skip to content

Create a report template

POST
/api/v1/reports/templates
curl --request POST \
--url https://api.ultimateteam.ai/api/v1/reports/templates \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "delivery_email": "example", "description": "example", "filters": {}, "groupings": [ "example" ], "metric_ids": [ "example" ], "name": "example", "output_format": "json", "schedule": "example", "shared_with_tenant": false }'

Create a new custom report template scoped to the caller’s tenant. Metric IDs are validated against the catalog.

Media typeapplication/json
ReportTemplateCreate

Schema for creating a new report template.

Attributes: name: Template name (max 120 chars). description: Optional description. metric_ids: Non-empty list of metric_id strings. filters: Optional dict of filter key-value pairs. groupings: Optional list of grouping columns. schedule: Optional cron expression. output_format: One of json, pdf, csv. delivery_email: Optional email for delivery. shared_with_tenant: Whether to share with all tenant users.

object
delivery_email
Any of:
string
description
Any of:
string
filters
Filters
object
key
additional properties
any
groupings
Groupings
Array<string>
metric_ids
required
Metric Ids
Array<string>
name
required
Name
string
<= 120 characters
output_format
Output Format
string
default: json
schedule
Any of:
string
shared_with_tenant
Shared With Tenant
boolean

Successful Response

Media typeapplication/json
Response Create Report Template Api V1 Reports Templates Post
object
key
additional properties
any
Examplegenerated
{}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}