OpenMeter Product Catalog

Create a new add-on.

post/openmeter/addons

Request

  • Base URL: http://localhost:8888/api/v3
  • URL: http://localhost:8888/api/v3/openmeter/addons
  • Auth: none declared

Request body

namestring required

Display name of the resource.

Between 1 and 256 characters.

descriptionstring

Optional description of the resource.

Maximum 1024 characters.

labelsLabels

Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

keystring required

A key is a unique string that is used to identify a resource.

instance_type'single' | 'multiple' required

The instanceType of the add-on.

  • single: Can be added to a subscription only once.
  • multiple: Can be added to a subscription more than once.

Example request

{
  "labels": {
    "env": "test"
  },
  "key": "resource_key",
  "currency": "USD",
  "rate_cards": [
    {
      "labels": {
        "env": "test"
      },
      "key": "resource_key",
      "feature": {
        "id": "01G65Z755AFWAKHE12NY0CQ9FH"
      },
      "currency": "USD",
      "billing_cadence": "P1Y",
      "tax_config": {
        "code": {
          "id": "01G65Z755AFWAKHE12NY0CQ9FH"
        }
      },
      "entitlement": {
        "usage_period": "P1Y"
      }
    }
  ]
}

Response

Addon created response.

idstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

namestring required

Display name of the resource.

Between 1 and 256 characters.

descriptionstring

Optional description of the resource.

Maximum 1024 characters.

labelsLabels

Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

created_atstring date-time required

RFC3339 formatted date-time string in UTC.

updated_atstring date-time required

RFC3339 formatted date-time string in UTC.

deleted_atstring date-time

RFC3339 formatted date-time string in UTC.

keystring required

A key is a unique string that is used to identify a resource.

versioninteger required

Version of the add-on. Incremented when the add-on is updated.

instance_type'single' | 'multiple' required

The instanceType of the add-on.

  • single: Can be added to a subscription only once.
  • multiple: Can be added to a subscription more than once.
effective_fromstring date-time

RFC3339 formatted date-time string in UTC.

effective_tostring date-time

RFC3339 formatted date-time string in UTC.

status'draft' | 'active' | 'archived' required

The status of the add-on defined by the effective_from and effective_to properties.

  • draft: The add-on has not yet been published and can be edited.
  • active: The add-on is published and available for use.
  • archived: The add-on is no longer available for use.

Example response

{
  "id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "labels": {
    "env": "test"
  },
  "created_at": "2023-01-01T01:01:01.001Z",
  "updated_at": "2023-01-01T01:01:01.001Z",
  "deleted_at": "2023-01-01T01:01:01.001Z",
  "key": "resource_key",
  "currency": "USD",
  "effective_from": "2023-01-01T01:01:01.001Z",
  "effective_to": "2023-01-01T01:01:01.001Z",
  "rate_cards": [
    {
      "labels": {
        "env": "test"
      },
      "key": "resource_key",
      "feature": {
        "id": "01G65Z755AFWAKHE12NY0CQ9FH"
      },
      "currency": "USD",
      "billing_cadence": "P1Y",
      "tax_config": {
        "code": {
          "id": "01G65Z755AFWAKHE12NY0CQ9FH"
        }
      },
      "entitlement": {
        "usage_period": "P1Y"
      }
    }
  ],
  "validation_errors": [
    {
      "field": "addons/pro/ratecards/token/featureKey"
    }
  ]
}

Changes

    • breaking

      added to the // request property allOf list

    • warning

      removed from the // request property allOf list

    • info

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

    • info

      removed from the // response property allOf list for the response status

    • breaking

      removed from the //// request property anyOf list

    • breaking

      removed from the ////// request property anyOf list

    • breaking

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

    • breaking

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

    • info

      added to the //// request property oneOf list

    • info

      added to the ////// request property oneOf list

    • info

      removed from the //// response property anyOf list for the response status

    • info

      removed from the ////// response property anyOf list for the response status