getApiKeysByIdApiKeysStats method
Get usage statistics for a specific API key. Returns usage count, last used date, failed attempts, etc.
Parameters:
Implementation
Future<GetApiKeysById200Response?> getApiKeysByIdApiKeysStats(String companyId, String apiKeyId,) async {
final response = await getApiKeysByIdApiKeysStatsWithHttpInfo(companyId, apiKeyId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GetApiKeysById200Response',) as GetApiKeysById200Response;
}
return null;
}