Fields and Metrics
The Usage Query API presents usage data through Fields and Metrics. A Field is simply an attribute of a set of usage. A Metric is calculated from the provided Fields.
For example, user John could have used two products in January. In this example, John and January are the Fields userName and usageMonth respectively. The calculated value two is the metric uniqueProducts, given the specified userName and usageMonth.
Conceptually, Metrics are measures calculated over the grouping of Fields.
Fields
General fields applicable for all usage categories.
productName Product name | Autocad |
usageDate Day of usage (UTC) | 2014-01-18 |
usageMonth Usage month (day always 01) | 2014-01-01 |
version Version of the product that was used | 2021 |
childProductName Child Product name | AutoCAD |
tokens Tokens charged for this usage. | 34251 |
emailAddress* End user email Id | Angel.Schuy123@gmail.com |
firstName* End user first name | Angel |
lastName* End user last name | Schuy |
userName* End user Autodesk username | Angel.Schuy |
profileImage* End user profile picture | https://presigned_url |
fullName* End user full name | Angel Schuy |
userId** End user unique identifier (O2 ID) | 4E5EKHKGWVH9 |
hashedUserId End user masked Id | ff75a4999120ea60d710fa9dbd221b352707a753 |
isParentProduct if productName is parent then 1 else 0 | 1 |
minorVersion Minor Version | 0.0.F |
reportingEntityId Reporting roll-up identifier (Subscription Id / Serial Number) | 62886631758778 |
contractNumber Agreement Number | 110001110101 |
productLineCode Uniquely identifies parent product (Collection) | ACAD |
featureId Uniquely identifies product within collection | ACAD |
source Identifies licensing/metering strategy (sus/ppu/flex) | flex |
usageWeek Usage week | 2021-06-27T00:00:00Z |
isProductVersioned if productName is versioned then 1 else 0 | 1 |
contextId Context(Team) Id | 4314051 |
teamName*** Context(Team) name/alias | ACME |
* These fields cannot be used in the where clause. If admin has chosen to hash user data, these fields are not allowed to be requested. To unhash personal data related fields, the admin can change the personal data setting in Autodesk Account.
** The userId field can be used in the where clause as long as personal data related fields are enabled.
*** The teamName field cannot be used in the where clause. Use contextId in the query parameter to filter instead.
If productLineCode is not a collection then productLineCode
and featureId
have same value.
tokens
are applicable only for source
“flex” and “ppu”.
Metrics
uniqueUsers Distinct count of users | 1 |
uniqueProducts Distinct count of products | 3 |
earliestUsageDate First usage Date (UTC) | 2021-07-01T00:00:00Z |
latestUsageDate Most recent usage Date (UTC) | 2021-07-25T00:00:00Z |
uniqueChildProducts Distinct count of child products | 3 |
uniqueVersions Distinct count of product versions | 3 |
uniqueMinorVersions Distinct count of product minor versions | 4 |
totalTokens Sum of tokens | 36.0 |
averageTokens Average tokens | 9.0 |
totalUniqueDays Distinct count of days | 4 |