import 'package:blockfrost/api.dart';
All URIs are relative to https://cardano-mainnet.blockfrost.io/api/v0
Method | HTTP request | Description |
---|---|---|
healthClockGet | GET /health/clock | Current backend time |
healthGet | GET /health | Backend health status |
rootGet | GET / | Root endpoint |
HealthClockGet200Response healthClockGet()
Current backend time
This endpoint provides the current UNIX time. Your application might use this to verify if the client clock is not out of sync.
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().getHealthApi();
try {
final response = api.healthClockGet();
print(response);
} catch on DioError (e) {
print('Exception when calling HealthApi->healthClockGet: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HealthGet200Response healthGet()
Backend health status
Return backend status as a boolean. Your application should handle situations when backend for the given chain is unavailable.
import 'package:blockfrost/api.dart';
final api = Blockfrost().getHealthApi();
try {
final response = api.healthGet();
print(response);
} catch on DioError (e) {
print('Exception when calling HealthApi->healthGet: $e\n');
}
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Get200Response rootGet()
Root endpoint
Root endpoint has no other function than to point end users to documentation.
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().getHealthApi();
try {
final response = api.rootGet();
print(response);
} catch on DioError (e) {
print('Exception when calling HealthApi->rootGet: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]