Usage Statistics

The number of keys and randomness requests can be fetched from the API per customer. The usage endpoint accepts GET requests. For identifying the customer, the client certificate of the onboarded user must be provided in the header. There are three distinct ways to perform the query, `from=date, to=date, group_by=method. The group_by query accepts the following methods. KEY-TYPE, MONTH, MONTH-AND-KEY-TYPE, TOTAL

curl -X GET
     --header "Content-Type: application/json"
     --cert <client crt of onboarded user>
     --key <private key of the client cert>
     'https://qo-uk.cambridgequantum.com/api/v1/usage?group_by=KEY-TYPE'

The response would look like

[{"count":103,"key_type":"AES-128"},{"count":24,"key_type":"DILITHIUM2"},
 {"count":3,"key_type":"RSA-3072"},{"count":67,"key_type":"RSA-4096"}]

The query arguments group_by, from and to can be combined together to retrieve usage statistics A sample use-case of from and to for querying between two dates would look like

curl -X GET
    ...
    'https://qo-uk.cambridgequantum.com/api/v1/usage?from=2022-05-03&to=2022-05-05&group_by=KEY-TYPE'