|
| 1 | +# ApiCallsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.segmentapis.com* |
| 4 | + |
| 5 | +| Method | HTTP request | Description | |
| 6 | +|------------- | ------------- | -------------| |
| 7 | +| [**getDailyPerSourceAPICallsUsage**](ApiCallsApi.md#getDailyPerSourceAPICallsUsage) | **GET** /usage/api-calls/sources/daily | Get Daily Per Source API Calls Usage | |
| 8 | +| [**getDailyWorkspaceAPICallsUsage**](ApiCallsApi.md#getDailyWorkspaceAPICallsUsage) | **GET** /usage/api-calls/daily | Get Daily Workspace API Calls Usage | |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +## Operation: getDailyPerSourceAPICallsUsage |
| 13 | + |
| 14 | +> GetDailyPerSourceAPICallsUsage200Response getDailyPerSourceAPICallsUsage(period, pagination) |
| 15 | +
|
| 16 | +Get Daily Per Source API Calls Usage |
| 17 | + |
| 18 | +Provides daily cumulative per-source API call counts for a usage period. |
| 19 | + |
| 20 | +### Example |
| 21 | + |
| 22 | +```java |
| 23 | +// Import classes: |
| 24 | +import com.segment.publicapi.ApiClient; |
| 25 | +import com.segment.publicapi.ApiException; |
| 26 | +import com.segment.publicapi.Configuration; |
| 27 | +import com.segment.publicapi.auth.*; |
| 28 | +import com.segment.publicapi.models.*; |
| 29 | +import com.segment.publicapi.api.ApiCallsApi; |
| 30 | + |
| 31 | +public class Example { |
| 32 | + public static void main(String[] args) { |
| 33 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 34 | + |
| 35 | + // Configure HTTP bearer authorization: token |
| 36 | + HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token"); |
| 37 | + token.setBearerToken("BEARER TOKEN"); |
| 38 | + |
| 39 | + ApiCallsApi apiInstance = new ApiCallsApi(defaultClient); |
| 40 | + String period = "2021-02-01"; // String | The start of the usage month in the ISO-8601 format. This parameter exists in v1. |
| 41 | + PaginationInput pagination = new PaginationInput(); // PaginationInput | Pagination input for per Source API calls counts. This parameter exists in v1. |
| 42 | + try { |
| 43 | + GetDailyPerSourceAPICallsUsage200Response result = apiInstance.getDailyPerSourceAPICallsUsage(period, pagination); |
| 44 | + System.out.println(result); |
| 45 | + } catch (ApiException e) { |
| 46 | + System.err.println("Exception when calling ApiCallsApi#getDailyPerSourceAPICallsUsage"); |
| 47 | + System.err.println("Status code: " + e.getCode()); |
| 48 | + System.err.println("Reason: " + e.getResponseBody()); |
| 49 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 50 | + e.printStackTrace(); |
| 51 | + } |
| 52 | + } |
| 53 | +} |
| 54 | +``` |
| 55 | + |
| 56 | +### Parameters |
| 57 | + |
| 58 | + |
| 59 | +| Name | Type | Description | Notes | |
| 60 | +|------------- | ------------- | ------------- | -------------| |
| 61 | +| **period** | **String**| The start of the usage month in the ISO-8601 format. This parameter exists in v1. | | |
| 62 | +| **pagination** | [**PaginationInput**](.md)| Pagination input for per Source API calls counts. This parameter exists in v1. | | |
| 63 | + |
| 64 | +### Return type |
| 65 | + |
| 66 | +[**GetDailyPerSourceAPICallsUsage200Response**](GetDailyPerSourceAPICallsUsage200Response.md) |
| 67 | + |
| 68 | +### Authorization |
| 69 | + |
| 70 | +[token](../README.md#token) |
| 71 | + |
| 72 | +### HTTP request headers |
| 73 | + |
| 74 | +- **Content-Type**: Not defined |
| 75 | +- **Accept**: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json |
| 76 | + |
| 77 | + |
| 78 | +### HTTP response details |
| 79 | +| Status code | Description | Response headers | |
| 80 | +|-------------|-------------|------------------| |
| 81 | +| **200** | OK | - | |
| 82 | +| **404** | Resource not found | - | |
| 83 | +| **422** | Validation failure | - | |
| 84 | +| **429** | Too many requests | - | |
| 85 | + |
| 86 | + |
| 87 | +## Operation: getDailyWorkspaceAPICallsUsage |
| 88 | + |
| 89 | +> GetDailyWorkspaceAPICallsUsage200Response getDailyWorkspaceAPICallsUsage(period, pagination) |
| 90 | +
|
| 91 | +Get Daily Workspace API Calls Usage |
| 92 | + |
| 93 | +Provides daily cumulative API call counts for a usage period. |
| 94 | + |
| 95 | +### Example |
| 96 | + |
| 97 | +```java |
| 98 | +// Import classes: |
| 99 | +import com.segment.publicapi.ApiClient; |
| 100 | +import com.segment.publicapi.ApiException; |
| 101 | +import com.segment.publicapi.Configuration; |
| 102 | +import com.segment.publicapi.auth.*; |
| 103 | +import com.segment.publicapi.models.*; |
| 104 | +import com.segment.publicapi.api.ApiCallsApi; |
| 105 | + |
| 106 | +public class Example { |
| 107 | + public static void main(String[] args) { |
| 108 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 109 | + |
| 110 | + // Configure HTTP bearer authorization: token |
| 111 | + HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token"); |
| 112 | + token.setBearerToken("BEARER TOKEN"); |
| 113 | + |
| 114 | + ApiCallsApi apiInstance = new ApiCallsApi(defaultClient); |
| 115 | + String period = "2021-02-01"; // String | The start of the usage month in the ISO-8601 format. This parameter exists in v1. |
| 116 | + PaginationInput pagination = new PaginationInput(); // PaginationInput | Pagination input for Workspace API call counts. This parameter exists in v1. |
| 117 | + try { |
| 118 | + GetDailyWorkspaceAPICallsUsage200Response result = apiInstance.getDailyWorkspaceAPICallsUsage(period, pagination); |
| 119 | + System.out.println(result); |
| 120 | + } catch (ApiException e) { |
| 121 | + System.err.println("Exception when calling ApiCallsApi#getDailyWorkspaceAPICallsUsage"); |
| 122 | + System.err.println("Status code: " + e.getCode()); |
| 123 | + System.err.println("Reason: " + e.getResponseBody()); |
| 124 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 125 | + e.printStackTrace(); |
| 126 | + } |
| 127 | + } |
| 128 | +} |
| 129 | +``` |
| 130 | + |
| 131 | +### Parameters |
| 132 | + |
| 133 | + |
| 134 | +| Name | Type | Description | Notes | |
| 135 | +|------------- | ------------- | ------------- | -------------| |
| 136 | +| **period** | **String**| The start of the usage month in the ISO-8601 format. This parameter exists in v1. | | |
| 137 | +| **pagination** | [**PaginationInput**](.md)| Pagination input for Workspace API call counts. This parameter exists in v1. | | |
| 138 | + |
| 139 | +### Return type |
| 140 | + |
| 141 | +[**GetDailyWorkspaceAPICallsUsage200Response**](GetDailyWorkspaceAPICallsUsage200Response.md) |
| 142 | + |
| 143 | +### Authorization |
| 144 | + |
| 145 | +[token](../README.md#token) |
| 146 | + |
| 147 | +### HTTP request headers |
| 148 | + |
| 149 | +- **Content-Type**: Not defined |
| 150 | +- **Accept**: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json |
| 151 | + |
| 152 | + |
| 153 | +### HTTP response details |
| 154 | +| Status code | Description | Response headers | |
| 155 | +|-------------|-------------|------------------| |
| 156 | +| **200** | OK | - | |
| 157 | +| **404** | Resource not found | - | |
| 158 | +| **422** | Validation failure | - | |
| 159 | +| **429** | Too many requests | - | |
| 160 | + |
0 commit comments