metrics

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-metrics"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/e94eda8e-0d17-42e8-ae7c-d1f7273e38b9/social-card.svg?v=3e7ae33eec8b" alt="metrics" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/metric-groupsScope insight:read

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/metric-groups"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "string",
      "description": "string",
      "id": "string",
      "metric_ids": [
        "string"
      ],
      "name": "string",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
metric_idsstring[]required
Saved metric ids in display order.
namestringrequired
updated_atstringrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/metric-groupsScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
descriptionstring
metric_idsstring[]required
Saved metric ids, 1 to 50, no repeats.
namestringrequired
{
  "description": "string",
  "metric_ids": [
    "string"
  ],
  "name": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/metric-groups" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","metric_ids":["string"],"name":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "description": "string",
  "id": "string",
  "metric_ids": [
    "string"
  ],
  "name": "string",
  "updated_at": "2024-01-01T00:00:00Z"
}
Schema
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
metric_idsstring[]required
Saved metric ids in display order.
namestringrequired
updated_atstringrequired
400
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/metric-groups/{id}Scope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/metric-groups/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

404
PUThttps://lucidace.com/v1/projects/{project_id}/metric-groups/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
descriptionstring
metric_idsstring[]required
Saved metric ids, 1 to 50, no repeats.
namestringrequired
{
  "description": "string",
  "metric_ids": [
    "string"
  ],
  "name": "string"
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/metric-groups/{id}" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","metric_ids":["string"],"name":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
409
DELETEhttps://lucidace.com/v1/projects/{project_id}/metric-groups/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/metric-groups/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/metric-treesScope insight:read

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/metric-trees"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "string",
      "description": "string",
      "id": "string",
      "name": "string",
      "nodes": [
        {}
      ],
      "north_star": true,
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
namestringrequired
nodesobject[]required
[{id, metric_id, label?, parent_id?, relation}], one root.
north_starbooleanrequired
The project's north-star tree (at most one).
updated_atstringrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/metric-treesScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
descriptionstring
namestringrequired
nodesNode[]required
Show child parameters
idstringrequired
Unique within the tree, 1 to 64 characters.
labelstring
mean_of_ratiosboolean
Ratio metrics: the mean of the daily ratios instead of total over total.
metric_idstringrequired
A saved proportion, mean or ratio metric.
parent_idstring
Null for the single root.
relationstring
How this node combines into its parent (ignored for the root).
sum | product | driver
north_starboolean
Make this the project's north-star tree (clears the flag on any other).
{
  "description": "string",
  "name": "string",
  "nodes": [
    {
      "id": "string",
      "label": "string",
      "mean_of_ratios": true,
      "metric_id": "string",
      "parent_id": "string",
      "relation": "sum"
    }
  ],
  "north_star": true
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/metric-trees" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","name":"string","nodes":[{"id":"string","label":"string","mean_of_ratios":true,"metric_id":"string","parent_id":"string","relation":"sum"}],"north_star":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "description": "string",
  "id": "string",
  "name": "string",
  "nodes": [
    {}
  ],
  "north_star": true,
  "updated_at": "2024-01-01T00:00:00Z"
}
Schema
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
namestringrequired
nodesobject[]required
[{id, metric_id, label?, parent_id?, relation}], one root.
north_starbooleanrequired
The project's north-star tree (at most one).
updated_atstringrequired
400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/metric-trees/north-starScope insight:read

Parameters

project_idstringpathrequired
fromstringquery
tostringquery
compare_fromstringquery
compare_tostringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/metric-trees/north-star"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 The north-star tree evaluated; null when the project has none yet
Example
{
  "compare_range": {
    "from": "2024-01-01T00:00:00Z",
    "to": "2024-01-01T00:00:00Z"
  },
  "name": "string",
  "nodes": [
    {
      "compare_value": 0,
      "contribution": 0,
      "delta": 0,
      "delta_pct": 0,
      "error": "string",
      "id": "string",
      "label": "string",
      "metric_id": "string",
      "metric_name": "string",
      "parent_id": "string",
      "relation": "sum",
      "value": 0
    }
  ],
  "north_star": true,
  "range": {
    "from": "2024-01-01T00:00:00Z",
    "to": "2024-01-01T00:00:00Z"
  },
  "tree_id": "string"
}
Schema
compare_rangeobjectrequired
Show child parameters
fromstringrequired
tostringrequired
namestringrequired
nodesNodeEvaluation[]required
Root first, then breadth first.
Show child parameters
compare_valuenumber
contributionnumber
Share of the parent's change explained by this node (1.0 = all of it); null for the root, driver nodes and parents that did not change.
deltanumber
value - compare_value.
delta_pctnumber
delta / compare_value; null when the comparison value is zero.
errorstring
Why the value is missing.
idstringrequired
labelstring
metric_idstringrequired
metric_namestringrequired
parent_idstring
relationstringrequired
How a child node combines into its parent.
sum | product | driver
valuenumber
north_starbooleanrequired
rangeobjectrequired
Show child parameters
fromstringrequired
tostringrequired
tree_idstringrequired
400
503
GEThttps://lucidace.com/v1/projects/{project_id}/metric-trees/{id}Scope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/metric-trees/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

404

Updated