App subscription operations
The app_subscription_operations object and its associated queries and mutations allow you to do just that by counting usage per operation type (kind) and per account. For annual and monthly subscriptions, the counter resets monthly based on the renewal date. For example, if a subscription renews annually on the 15th of the month, the counter will reset on the 15th of each month.
Using the increase_app_subscription_operations mutation, you can increase the operation counter based on an account’s usage and then query app_subscription_operations to read the updated values. These queries and mutations will only work with access tokens generated for the app, and the account must have an active app subscription. Developer access tokens will not work.
Queries
You can use the app_subscription_operations query to retrieve app operation data via the API.
- Returns an object containing an operation count for feature-based apps
- Can only be queried directly at the root; can’t be nested within another query
Arguments
You can use the following argument to reduce the number of app subscription operations returned.
Fields
You can use the following fields to specify what information your app subscription operations query will return. Some fields support their own subfields.
Mutations
The API allows you to increase and app subscription operations using the following mutation.
Increase app subscription operations
The increase_app_subscription_operations mutation increases the counter for a specific operation via the API. You can specify which fields to return in the mutation response. It will return an error if no active subscription exists for the supplied token.
Arguments
You can use the following arguments to specify which operation to increase and by how much. If you omit these arguments, it will default to a global kind and increment by 1.