User metadata missing from GET https://api.cryptlex.com/v3/licenses?email=XXX

I’m using the GET https://api.cryptlex.com/v3/licenses API to search for a particular license.
For the data that gets returned, it expands the “user” and “reseller” fields to include data from those records in the user table.

However, the “metadata” for the user and reseller is always empty.

Is this a bug?

If I query the user using the GET https://api.cryptlex.com/v3/users API, then this does get all the metadata.
For example, if I query the user with email "francis@example.com", the metadata is correct.
The metadata field is set to:

‘metadata’: [{‘key’: ‘TESTID’, ‘value’: ‘12345’, ‘visible’: True}],

Here is the full response:

GET: https://api.cryptlex.com/v3/users?email=francis@example.com
RESP: <Response [200]>
[{'company': 'Kuvacode Oy',
  'createdAt': '2019-09-24T10:05:30.052886',
  'email': 'francis@example.com',
  'firstName': 'Francis',
  'googleSsoEnabled': False,
  'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'lastLoginAt': '2020-02-12T06:57:50.218361',
  'lastName': 'Hart',
  'lastSeenAt': '2020-02-14T10:36:44.235979',
  'metadata': [{'key': 'TESTID', 'value': '12345', 'visible': True}],
  'name': 'Francis Hart',
  'role': 'user',
  'roles': [],
  'tags': [],
  'twoFactorEnabled': False,
  'updatedAt': '2020-02-15T17:32:09.542065'}]

But if I query the licenses for francis@example.com, the metadata for the user is missing.
The metadata field is set to:

 'metadata': [],

Here is the full response:

GET: https://api.cryptlex.com/v3/licenses?email=francis@example.com
RESP: <Response [200]>
[{'allowVmActivation': False,
  'allowedActivations': 3,
  'allowedClockOffset': 60,
  'allowedCountries': [],
  'allowedDeactivations': 999,
  'allowedFloatingClients': 0,
  'allowedIpAddresses': [],
  'createdAt': '2019-10-16T10:25:48.277422',
  'disableGeoLocation': False,
  'disallowedCountries': [],
  'disallowedIpAddresses': [],
  'expirationStrategy': 'delayed',
  'expiresAt': '2021-01-24T00:57:19.251726',
  'fingerprintMatchingStrategy': 'fuzzy',
  'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'key': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'leaseDuration': 0,
  'leasingStrategy': 'per-machine',
  'metadata': [{'key': 'order_id', 'value': '123456', 'visible': True}],
  'meterAttributes': [],
  'notes': None,
  'productId': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'requireAuthentication': False,
  'reseller': None,
  'revoked': False,
  'serverSyncGracePeriod': 605500,
  'serverSyncInterval': 3600,
  'suspended': False,
  'tags': [],
  'totalActivations': 2,
  'totalDeactivations': 0,
  'type': 'node-locked',
  'updatedAt': '2019-10-16T10:25:48.277426',
  'user': {'company': 'Kuvacode Oy',
           'createdAt': '2019-09-24T10:05:30.052886',
           'email': 'francis@example.com',
           'firstName': 'Francis',
           'googleSsoEnabled': False,
           'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
           'lastLoginAt': '2020-02-12T06:57:50.218361',
           'lastName': 'Hart',
           'lastSeenAt': '2020-02-14T10:36:44.235979',
           'metadata': [],
           'name': 'Francis Hart',
           'role': 'user',
           'roles': [],
           'tags': [],
           'twoFactorEnabled': False,
           'updatedAt': '2020-02-15T17:32:09.542065'},
  'userLocked': False,
  'validity': 31572500}]

Hi Francis,

Yes, this is a bug. Will get this fixed.

Regards,
Adnan

1 Like