For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Copy to LLMGithubGo to App
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
    • Overview
  • Python SDK
    • Reference
    • REST API Client
  • Typescript SDK
    • Overview
    • Opik TS
    • Prompts
    • Opik Query Language (OQL)
  • Rest API
    • Overview
        • GETFind alerts by project
        • GETFind dashboards by project
        • GETFind datasets by project
        • GETFind experiments by project
        • GETFind optimizations by project
        • GETGet prompts by project
        • GETFind projects
        • POSTCreate project
        • GETGet project by id
        • DELDelete project by id
        • PATCHUpdate project by id
        • POSTDelete projects
        • GETFind Feedback Score names By Project Ids
        • GETFind Token Usage names
        • POSTGet Project KPI Cards
        • POSTGet Project Metrics
        • GETGet Project Stats
        • POSTRetrieve project
        • GETGet recent activity for a project
LogoLogo
Copy to LLMGithubGo to App
Rest APIAPI ReferenceProjects

Get Project Metrics

POST
/v1/private/projects/:id/metrics
POST
/api/v1/private/projects/:id/metrics
$curl -X POST http://localhost:5173/api/v1/private/projects/id/metrics \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "project_id": "string",
3 "metric_type": "FEEDBACK_SCORES",
4 "interval": "HOURLY",
5 "results": [
6 {
7 "name": "string",
8 "data": [
9 {
10 "time": "2024-01-15T09:30:00Z",
11 "value": 1.1
12 }
13 ]
14 }
15 ]
16}
Gets specified metrics for a project
Was this page helpful?
Previous

Get Project Stats

Next
Built with

Path parameters

idstringRequiredformat: "uuid"

Request

This endpoint expects an object.
metric_typeenumOptional
intervalenumOptional
Allowed values:
interval_startdatetimeOptional
interval_enddatetimeOptional
span_filterslist of objectsOptional
trace_filterslist of objectsOptional
thread_filterslist of objectsOptional
breakdownobjectOptional

Response

Project Metrics
project_idstringformat: "uuid"
metric_typeenum
intervalenum
Allowed values:
resultslist of objects

Errors

400
Bad Request Error
404
Not Found Error