OpenMeter Entitlements

Query entitlement access

Changed on

Query feature access for a list of customers.

The endpoint resolves each provided identifier to a customer and returns the access status for the requested features, plus optional credit balance availability.

Designed to be called on a fixed refresh interval and the query response is intended to be cached.

post/v3/openmeter/entitlement-access/query

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Query parameters

page, CursorPaginationQueryPage

Determines which page of the collection to retrieve.

size, integer

The number of items to include per page.

after, string

Request the next page of data, starting with the item after this parameter.

before, string

Request the previous page of data, starting with the item before this parameter.

Request body

EntitlementAccessQueryRequest required

Query to evaluate feature access for a list of customers.

include_credits, boolean

Whether to include credit balance availability for each resolved customer. When true, each feature evaluation includes credit balance checks.

Defaults to false.

customer, object required

List of customer identifiers to evaluate access for.

feature, object

Optional list of feature keys to evaluate access for. If omitted, all features available in the organization are returned. Providing this list is recommended to reduce the response size and the load on the backend services.

Response

The request has succeeded.

EntitlementAccessQueryResponse required

Response of the entitlement access query.

data, EntitlementAccessQueryResult[] required

Access evaluation results, one entry per resolved customer.

errors, EntitlementAccessQueryError[] required

Partial errors encountered while processing the request.

meta, object required

Pagination metadata. The endpoint may return a partial response if the full response would exceed server-side limits.

Example response

{
  "data": [
    {
      "customer": {
        "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": "019ae40f-4258-7f15-9491-842f42a7d6ac",
        "currency": "USD",
        "billing_address": {
          "country": "US"
        }
      },
      "updated_at": "2023-01-01T01:01:01.001Z"
    }
  ],
  "meta": {
    "page": {
      "size": 10
    }
  }
}

Changes

    • breaking

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

    • warning

      added the new key_invalid enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status

    • warning

      added the new unique enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status