Usage Metrics

List all Usage Metrics

Changed on

List all Usage Metrics

get/usage-metrics

Request

  • Base URL
    https://sandbox.sequencehq.com/api
  • URL
    https://sandbox.sequencehq.com/api/usage-metrics
  • Auth
    none declared. Required headers: Authorization

Query parameters

limitinteger

Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).

afterstring

Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from pagination.after or pagination.before to retrieve each page.

beforestring

Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from pagination.next or pagination.previous to retrieve each page.

namestring

Filter metrics by name (case-insensitive substring)

idstring

Filter metrics by ID (case-insensitive substring)

eventTypestring

Filter metrics by event type(s). Comma-separated; individual values must be percent-encoded so values containing commas are preserved.

eventPropertystring

Filter metrics by aggregation property name(s). Comma-separated; individual values must be percent-encoded so values containing commas are preserved.

aggregationTypestring

Filter metrics by aggregation type(s); comma-separated

Headers

Authorizationstring required

Your API credentials. Eg. Basic {credentials}.

Sequence-Version'2024-07-30'

Use this header to select an API version

Response

OK

Example response

{
  "items": [
    {
      "id": "f092246c-6b90-4106-bcca-304ccf06bf45",
      "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1",
      "name": "Total length of sent messages.",
      "description": "Total length of sent messages.",
      "metricType": "GROUPED",
      "eventType": "message_sent",
      "aggregationType": "COUNT",
      "aggregationProperty": "message_length",
      "groupingProperty": "channel",
      "unit": "bytes",
      "createdAt": "2022-06-28T16:47:00Z",
      "deletedAt": "2022-06-28T16:47:00Z",
      "propertyFilters": {
        "channels": [
          "text",
          "email"
        ]
      },
      "caseSensitive": true,
      "propertiesToNegate": [
        "channels"
      ],
      "parameters": [
        {
          "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
          "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45",
          "name": "myParam",
          "type": "INTEGER",
          "description": "My parameter",
          "defaultValue": "10"
        }
      ]
    }
  ],
  "pagination": {
    "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
    "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
    "totalResultSize": 10
  }
}

Changes

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • warning

      deleted the header request parameter sequence-version

    • info

      added the new optional header request parameter Sequence-Version

    • info

      for the query request parameter limit, the format was generalized from int32 to no format

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status