Skip to main content
Skip table of contents

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

metric

PK<EntityMetric>

Yes

external_ref

ERef<EntityMetric>

Yes

value

float

Yes

start_date

datetime format %Y-%m-%dT%H:%M:%S.%fZ

MetricType.Periodic=True

end_date

datetime format %Y-%m-%dT%H:%M:%S.%fZ

MetricType.Periodic=True

Example Payload with Metric Id

JSON
{
  "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

JSON
{
  "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

JSON
{
    "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
      }
  }

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.