Restr API 2 - USERS - Returns incorrect License Type
I am using the REST API V2 to fetch Users Data - one of the key field I am intrested is License Type.
The Json result for the user is differnet between 2 API’s
-
https://kraftheinz-dev.collibra.com/rest/2.0/users?userId=XXXXXXXXXXXXXXXXXXXXXXX
give’s me the output JSON with license Type as "CONSUMER"
where as the user is assigned with a “Author License”
If we use the Rest API V2 - USERS/LicenseType
https://kraftheinz-dev.collibra.com/rest/2.0/users/XXXXXXXXXXXXXXXXXXXXXXX/licenseType - this gives me the correct result.
Can you help understand why is this behaviour ? and is this a know bug ?
Sudhir Nune
Posted 3 years ago · Edited 1 year ago·Last reply 3 years ago
5 comments
oliversteadman
·3 years ago · EditedThanks for the insight @arthur.burkhardt
So there is no way to retrieve “Required License” via any REST API?
oliversteadman
·3 years ago · EditedThanks for the insight @arthur.burkhardt
So there is no way to retrieve “Required License” via any REST API?
arthurburkhardt
·3 years ago · EditedOnly via the output module, which is technically a core API
query = """ViewConfig: displayLength: 50 Resources: User: Id: {'name': 'userId'} requiredLicenseType: {'name':'requiredLicenseType'}""" r = c.post('outputModule/export/json', json=yaml.safe_load(query)) Counter(x['requiredLicenseType'] for x in r.json()['view']['User0'])arthurburkhardt
·3 years ago · EditedThere’s a difference between the assigned license (in your case CONSUMER) and the required license (AUTHOR).
You can get this information through the outputmodule API: https://datacitizens.collibra.com/forum/t/licensetype-and-other-license-related-api/177/6?u=arthur.burkhardt
I don’t know if it’s a bug or a feature, but yes, it could be better.
Sudhir Nune
OP3 years ago · EditedHi @arthur.burkhardt,
thanks for the reply, yes I understood teh difference, but the Schema on the Output for both API’s are same “licenseType”, that where its not clear.