A fleet API key's usage
const url = 'https://example.com/api/nss/keys/example/usage';const options = {method: 'GET', headers: {'X-Ssoossh-Key-Secret': '<X-Ssoossh-Key-Secret>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/nss/keys/example/usage \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'Lookups and misses per source address, secret generation and UTC day, newest day first, kept for nss.usage_retention. Counts are written once a minute, so the newest minute is not in them yet. Whoever may view the key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Key id
Query Parameters
Section titled “Query Parameters”Next_cursor of the previous page
Page size, 1 to 100 (default 25)
Responses
Section titled “Responses”One page of usage
object
object
NextCursor is the after for the following page, absent on the last.
object
Day is midnight UTC of the day counted.
Total counts every retained row for the key, across all pages.
Example generated
{ "data": { "next_cursor": "example", "rows": [ { "day": "example", "first_seen": "example", "generation": 1, "last_seen": "example", "lookups": 1, "misses": 1, "source_ip": "example" } ], "total": 1 }, "error": "example"}A malformed limit or an unknown cursor
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}No valid session
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}No such key the caller may view, or nss_disabled
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}