Create or Update an Entity Metric
URL
PUT https://<tenant>.bubbleppm.com/api/v3/entities/<entity_id>/metrics/
PUT https://<tenant>.bubbleppm.com/api/v3/entities/<entity_external_ref>/metrics/?use_external_refs
External Refs
This endpoint supports External Refs. For more information please refer to the documentation here.
Attributes
Name | Type | Required |
|---|---|---|
| PK<EntityMetric> | Yes |
| ERef<EntityMetric> | Yes |
| float | Yes |
| datetime format |
|
| datetime format |
|
Example Payload with Metric Id
{
"metric": 1,
"value": 7.0,
"start_date": "2023-01-01T00:01:00.00Z",
"end_date": "2023-01-02T00:01:00.00Z"
}
Example Payload with External Ref
{
"external_ref": "ABC_123",
"value": 7.0,
"start_date": "2023-01-01T00:01:00.00Z",
"end_date": "2023-01-02T00:01:00.00Z"
}
Example Response
{
"id": 1,
"value": 7.0,
"start_date": "2023-01-01T00:01:00Z",
"end_date": "2023-01-02T00:01:00Z",
"metric": {
"id": 1,
"name": "MRR",
"type": {
"id": 1,
"name": "Periodic",
"periodic": true
}
}