Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Latest commit

 

History

History
67 lines (48 loc) · 2.47 KB

UsageManagementApi.md

File metadata and controls

67 lines (48 loc) · 2.47 KB

UsageManagementApi

All URIs are relative to https://localhost/api/v0002

Method HTTP request Description
usageDataTrafficGet GET /usage/data-traffic Retrieve the amount of data used

usageDataTrafficGet

DataTraffic usageDataTrafficGet(start, end, detail)

Retrieve the amount of data used

Retrieve the amount of data used

Example

// Import classes:
//import com.ibm.wiotp.swagger.ApiClient;
//import com.ibm.wiotp.swagger.ApiException;
//import com.ibm.wiotp.swagger.Configuration;
//import com.ibm.wiotp.swagger.auth.*;
//import com.ibm.wiotp.swagger.api.UsageManagementApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: ApiKey
HttpBasicAuth ApiKey = (HttpBasicAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setUsername("YOUR USERNAME");
ApiKey.setPassword("YOUR PASSWORD");

UsageManagementApi apiInstance = new UsageManagementApi();
String start = "start_example"; // String | Start date in one of the following formats: YYYY (first day of the year), YYYY-MM (first day of the month), YYYY-MM-DD (specific day)
String end = "end_example"; // String | End date in one of the following formats: YYYY (last day of the year), YYYY-MM (last day of the month), YYYY-MM-DD (specific day)
Boolean detail = true; // Boolean | Indicates whether a daily breakdown will be included in the result set
try {
    DataTraffic result = apiInstance.usageDataTrafficGet(start, end, detail);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UsageManagementApi#usageDataTrafficGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
start String Start date in one of the following formats: YYYY (first day of the year), YYYY-MM (first day of the month), YYYY-MM-DD (specific day)
end String End date in one of the following formats: YYYY (last day of the year), YYYY-MM (last day of the month), YYYY-MM-DD (specific day)
detail Boolean Indicates whether a daily breakdown will be included in the result set [optional]

Return type

DataTraffic

Authorization

ApiKey

HTTP request headers

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