Metrics

Create a billable metric

Changed on
post/api/v1/metrics

Request

  • The document declares no server URL.
  • Auth
    HTTP bearer

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

    • breaking

      removed subschema #2 subschema #3 from the //// request property oneOf list

    • breaking

      added to the //// response property oneOf list for the response status

    • info

      added DOUBLE LINKED discriminator mapping keys to the //// request property

    • info

      request discriminator property name changed for //// request property from discriminator to type

    • info

      added to the //// request property oneOf list

    • info

      added DOUBLE LINKED discriminator mapping keys to the //// response property for the response status

    • info

      response discriminator property name changed for //// response property from discriminator to type for the response status

    • info

      removed subschema #2 subschema #3 from the //// response property oneOf list for the response status

    • warning

      added the new TOO_MANY_REQUESTS enum value to the response property for the response status

    • warning

      added the new TOO_MANY_REQUESTS enum value to the response property for the response status

    • info

      added the non-success response with the status