Metrics

Create a billable metric

post/api/v1/metrics

Request body

aggregation_keystring nullable
aggregation_type'COUNT' | 'LATEST' | 'MAX' | 'MIN' | 'MEAN' | 'SUM' | 'COUNT_DISTINCT' required
codestring required
descriptionstring nullable
namestring required
product_family_idstring MeteroidId required
product_idstring MeteroidId
usage_group_keystring nullable

Example request

{
  "product_family_id": "pf_7n42DGM5Tflk9n8mt7Fhc7",
  "product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
}

Response

Metric created

aggregation_keystring nullable
aggregation_type'COUNT' | 'LATEST' | 'MAX' | 'MIN' | 'MEAN' | 'SUM' | 'COUNT_DISTINCT' required
archived_atstring date-time nullable
codestring required
created_atstring date-time required
descriptionstring nullable
idstring MeteroidId required
namestring required
product_family_idstring MeteroidId required
product_idstring MeteroidId
usage_group_keystring nullable

Example response

{
  "id": "bm_7n42DGM5Tflk9n8mt7Fhc7",
  "product_family_id": "pf_7n42DGM5Tflk9n8mt7Fhc7",
  "product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
}

Changes

Changed in 4 of the 54 revisions of this API.328

  • v1ee465c53a42326See the full diff
    • removed subschema #2 subschema #3 from the segmentation_matrix/oneOf[MetricSegmentationMatrix]/ request property oneOf list

      request-property-one-of-removed

    • added DoubleSegmentationMatrix LinkedSegmentationMatrix to the segmentation_matrix/oneOf[MetricSegmentationMatrix]/ response property oneOf list for the response status 201

      response-property-one-of-added

    • added DOUBLE LINKED discriminator mapping keys to the segmentation_matrix/oneOf[MetricSegmentationMatrix]/ request property

      request-property-discriminator-mapping-added

    • request discriminator property name changed for segmentation_matrix/oneOf[MetricSegmentationMatrix]/ request property from discriminator to type

      request-property-discriminator-property-name-changed

    • added DoubleSegmentationMatrix LinkedSegmentationMatrix to the segmentation_matrix/oneOf[MetricSegmentationMatrix]/ request property oneOf list

      request-property-one-of-added

    • added DOUBLE LINKED discriminator mapping keys to the segmentation_matrix/oneOf[MetricSegmentationMatrix]/ response property for the response status 201

      response-property-discriminator-mapping-added

    • response discriminator property name changed for segmentation_matrix/oneOf[MetricSegmentationMatrix]/ response property from discriminator to type for the response status 201

      response-property-discriminator-property-name-changed

    • removed subschema #2 subschema #3 from the segmentation_matrix/oneOf[MetricSegmentationMatrix]/ response property oneOf list for the response status 201

      response-property-one-of-removed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • v1de35c02bb0d221See the full diff
    • added the new TOO_MANY_REQUESTS enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new TOO_MANY_REQUESTS enum value to the code response property for the response status 401

      response-property-enum-value-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • endpoint added

      endpoint-added

    This revision also has 14 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 274 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog