Retrieve subscription info
Method
GET https://papi.afi.ai/api/v1/orgs/{org_id}/licensing/subscriptions
Description
Retrieves tenant's subscription info.
To list all available subscriptions, use 'limit' and 'page_token' as query parameters.
Path params
org_id
string
required
ID of the organization to list subscriptions for.
|
Query params
limit
int32
Max number of items in the resulting page.
|
page_token
string
Token from the previous list operation (next_page_token) to continue listing.
|
curl -X GET \
-H 'Authorization: {api-key}' \
https://papi.afi.ai/api/v1/orgs/{org_id}/licensing/subscriptions
Successful response (200) schema
object
SubscriptionsPage is a result of listing subscriptions.
|
next_page_token
string
Next page token to continue listing operation, i.e. to be set as next request page_token. Empty on last page.
|
items
array of objects
Array of subscriptions matching listing request.
object
Subscription describes status and details of the service subscription.
|
id
string
ID of the subscription.
|
status
string
Subscription status. Possible values are trial, trial_expired, active, expired, or canceled.
|
expires
date-time
Expected time of subscription expiration or renewal (for active subscriptions).
|
tenant_id
string
ID of the tenant this subscription is assigned to.
|
items
array of objects
Items describe specific billable item classes licensed by this subscription (aka subscription items).
object
SubscriptionItem describes subscription details related to a specific billable item kind (resource (user), storage, node, etc.).
|
kind
string
Subscription item kind (resource, storage, node, etc.).
|
qty
int64
Number of licensed units of a given billable item kind, e.g. 10 resources or 5 additional storage licenses each granting 100GB quota.
|
auto_license
boolean
Flag specifying whether this subscription item is periodically adjusted (auto-licensed) by the service based on the current consumption. Configured by administrator.
|
auto_license_max
int64
Max quantity of a subscription item units that can be set by the automatic license count adjustment procedure. Configured by administrator.
|
|
quotas
array of objects
Information about quota limits granted by this subscription to the tenant.
object
Quota describes licensed limits for a given item kind.
|
kind
string
Item kind covered by this quota item (resource (user), storage, node, etc.).
|
count
int64
Quota limit, i.e. max number of item units allowed to consume.
|
units
string
Unit of measure used in this quota item (empty for resource/node quota kind, MB/GB for storage).
|
|
|
Response example
{
"next_page_token": "string",
"items": [
{
"id": "string",
"status": "string",
"expires": "2024-11-15T12:47:12.538227Z",
"tenant_id": "string",
"items": [
{
"kind": "string",
"qty": "int64-as-string",
"auto_license": true,
"auto_license_max": "int64-as-string"
}
],
"quotas": [
{
"kind": "string",
"count": "int64-as-string",
"units": "string"
}
]
}
]
}
|