Licensing
Access your Tenable One Cloud Exposure license information and usage programmatically.
List license information
This example shows a query which fetches your organization's license information, including license type, total number of licensed resources, and renewal date.
query {
Organization {
Licensing {
SubscriptionLicense {
Type
ResourceCount
RenewalTime
}
}
}
}Sample Response
{
"data": {
"Organization": {
"Licensing": {
"SubscriptionLicense": {
"Type": "Enterprise",
"ResourceCount": 1234,
"RenewalTime": "2025-07-07T21:00:00.000Z"
}
}
}
}
}List license usage
This example shows a query which fetches information about license usage for a specific account scope, including the total number of billable resources, the daily average of billable resources, and a breakdown of the billable resources.
This query uses the ScopeId filter as an input for the desired account scope, which can be the Id of either a folder or a specific account:
- To retrieve a folder
Id, first use theFoldersquery (see here for an example). - To retrieve a specific account
Id, first use the relevant cloud provider query to list all onboarded accounts by ID/name.
query {
Licensing (filter: {ScopeId: "1234-5678-9ABC-DEFG"}) {
LastResourceCount
AverageResourceCount
ResourceTypes
}
}Sample Response
{
"data": {
"Licensing": {
"LastResourceCount": 812,
"AverageResourceCount": 795,
"ResourceTypes": {
"AwsEc2Instance": 371,
"AwsEc2InstanceEcs": 1,
"AwsEcsServiceFargate": 4,
"AwsEc2InstanceEks": 37,
"AwsLambdaFunctionConfiguration": 23,
"AwsKubernetesNode": 0,
"AzureComputeVirtualMachineScaleSetVirtualMachine": 25,
...
}
}
}
}List onboarded accounts from a specific cloud provider
This example shows a query which fetches your onboarded Azure subscriptions by their ID and name. You can then use this Id to List License Usage for a specific account.
query {
AzureSubscriptions {
nodes {
Id
Name
}
}
}Sample Response
{
"data": {
"AzureSubscriptions": {
"nodes": [
{
"Id": "********-642d-456e-****-482524dbab6c",
"Name": "Org1Subscription2"
},
{
"Id": "********-4ff3-4f18-****-5edef0e7a68a",
"Name": "Org2Development"
}
]
}
}
}Updated 42 minutes ago
