import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const response = await client.v1.customers.retrieveEntitlements('x');
console.log(response.data);{
"data": {
"entitlements": [
{
"isGranted": true,
"type": "FEATURE",
"accessDeniedReason": null,
"feature": {
"id": "feature-api-calls",
"displayName": "API Calls",
"featureType": "NUMBER",
"featureStatus": "ACTIVE"
},
"usageLimit": 10000,
"hasUnlimitedUsage": false,
"resetPeriod": "MONTH",
"currentUsage": 2500
},
{
"isGranted": true,
"type": "FEATURE",
"accessDeniedReason": null,
"feature": {
"id": "feature-sso",
"displayName": "Single Sign-On",
"featureType": "BOOLEAN",
"featureStatus": "ACTIVE"
}
}
],
"accessDeniedReason": null
}
}Retrieves the effective entitlements for a customer or resource, including feature and credit entitlements.
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const response = await client.v1.customers.retrieveEntitlements('x');
console.log(response.data);{
"data": {
"entitlements": [
{
"isGranted": true,
"type": "FEATURE",
"accessDeniedReason": null,
"feature": {
"id": "feature-api-calls",
"displayName": "API Calls",
"featureType": "NUMBER",
"featureStatus": "ACTIVE"
},
"usageLimit": 10000,
"hasUnlimitedUsage": false,
"resetPeriod": "MONTH",
"currentUsage": 2500
},
{
"isGranted": true,
"type": "FEATURE",
"accessDeniedReason": null,
"feature": {
"id": "feature-sso",
"displayName": "Single Sign-On",
"featureType": "BOOLEAN",
"featureStatus": "ACTIVE"
}
}
],
"accessDeniedReason": null
}
}Server API Key
The unique identifier of the entity
1 - 255Resource ID to scope entitlements to a specific resource
255The entitlements state including feature and credit entitlements, and an optional access denied reason.
Response object
The effective entitlements state for a customer or resource.
Show child attributes