All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| getUsageStats | GET /v1/usage-stats | Get plan and usage stats |
| getUsageStatsWithHttpInfo | GET /v1/usage-stats | Get plan and usage stats |
UsageStats getUsageStats()
Get plan and usage stats
Returns the current plan name, billing period, plan limits, and usage counts.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.UsageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
UsageApi apiInstance = new UsageApi(defaultClient);
try {
UsageStats result = apiInstance.getUsageStats();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsageApi#getUsageStats");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage stats | - |
| 401 | Unauthorized | - |
| 404 | Resource not found | - |
ApiResponse getUsageStats getUsageStatsWithHttpInfo()
Get plan and usage stats
Returns the current plan name, billing period, plan limits, and usage counts.
// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.UsageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://zernio.com/api");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
UsageApi apiInstance = new UsageApi(defaultClient);
try {
ApiResponse<UsageStats> response = apiInstance.getUsageStatsWithHttpInfo();
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling UsageApi#getUsageStats");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
ApiResponse<UsageStats>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Usage stats | - |
| 401 | Unauthorized | - |
| 404 | Resource not found | - |