Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
matteoredaelli
Contributor III
Contributor III

filters for qlik license consumption ls

Hello

 

Which filters can I use for

   filters for qlik license consumption ls

I cannot find any info at

  https://qlik.dev/toolkits/qlik-cli/license/license-consumption-ls/

 

I'd' like to filter for endTime and LicenseUsage

but I get

 

```

qlik license consumption ls --filter 'licenseUsage eq "ASSIGNED_LICENSE"'


Error: {
"error": "LICENSES-InternalServerError",
"message": "could not convert filter, expression is invalid: unsupported attribute received: licenseusage",
"errors": [
{
"code": "LICENSES-037",
"title": "could not convert filter, expression is invalid: unsupported attribute received: licenseusage"
}
]
}

Labels (1)
  • API

5 Replies
jprdonnelly
Employee
Employee

@matteoredaelli - it appears that the endpoint does not support filtering with the licenseUsage attribute, though it does work with endTime.

qlik license consumption ls --filter 'endTime ge "2023-11-21T18:21:51.635Z"'

 

Another option would be to parse using PowerShell or jq to help isolate the values

qlik license consumption ls --raw | jq '.data[].licenseUsage'
- @jprdonnelly
DaveChannon
Employee
Employee

For future reference, you should be able to tell which fields are filterable by looking for filterable in the response property list (note filterable is tagged only against endTime) on https://qlik.dev/apis/rest/licenses/#%23%2Fdefinitions%2FconsumptionEventsResponse 

Screenshot 2024-01-02 at 11.14.14.png

matteoredaelli
Contributor III
Contributor III
Author

Many thanks!

matteoredaelli
Contributor III
Contributor III
Author

Hello 

I can see the "filtrable" text from your screenshot but I cannot find it following the link you shared...

Regards

Matteo

 

DaveChannon
Employee
Employee

You might need to follow the link and then Ctrl+F in the browser. We currently have a problem with qlik.dev which isn't taking you to deep links correctly (sorry!). Or search for consumptionEventsResponse and go from there.