Skip to content

Latest commit

 

History

History
101 lines (68 loc) · 2.84 KB

MetricsApi.md

File metadata and controls

101 lines (68 loc) · 2.84 KB

blockfrost.api.MetricsApi

Load the API package

import 'package:blockfrost/api.dart';

All URIs are relative to https://cardano-mainnet.blockfrost.io/api/v0

Method HTTP request Description
metricsEndpointsGet GET /metrics/endpoints Blockfrost endpoint usage metrics
metricsGet GET /metrics Blockfrost usage metrics

metricsEndpointsGet

BuiltList metricsEndpointsGet()

Blockfrost endpoint usage metrics

History of your Blockfrost usage metrics per endpoint in the past 30 days.

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getMetricsApi();

try {
    final response = api.metricsEndpointsGet();
    print(response);
} catch on DioError (e) {
    print('Exception when calling MetricsApi->metricsEndpointsGet: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<MetricsEndpointsInner>

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

metricsGet

BuiltList metricsGet()

Blockfrost usage metrics

History of your Blockfrost usage metrics in the past 30 days.

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getMetricsApi();

try {
    final response = api.metricsGet();
    print(response);
} catch on DioError (e) {
    print('Exception when calling MetricsApi->metricsGet: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<MetricsInner>

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]