|
| 1 | +# SpaceSchemaApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.segmentapis.com* |
| 4 | + |
| 5 | +| Method | HTTP request | Description | |
| 6 | +|------------- | ------------- | -------------| |
| 7 | +| [**listEvents**](SpaceSchemaApi.md#listEvents) | **GET** /spaces/{spaceId}/events | List Events | |
| 8 | +| [**listPropertiesFromEvent**](SpaceSchemaApi.md#listPropertiesFromEvent) | **GET** /spaces/{spaceId}/events/{eventName}/properties | List Properties from Event | |
| 9 | +| [**listSampleValuesFromEventProperty**](SpaceSchemaApi.md#listSampleValuesFromEventProperty) | **GET** /spaces/{spaceId}/events/{eventName}/properties/{propertyName}/sample-values | List Sample Values from Event Property | |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +## Operation: listEvents |
| 14 | + |
| 15 | +> ListEvents200Response listEvents(spaceId, pagination, sortBy, sortDir, search) |
| 16 | +
|
| 17 | +List Events |
| 18 | + |
| 19 | +Returns a list of Events for a Space. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. |
| 20 | + |
| 21 | +### Example |
| 22 | + |
| 23 | +```java |
| 24 | +// Import classes: |
| 25 | +import com.segment.publicapi.ApiClient; |
| 26 | +import com.segment.publicapi.ApiException; |
| 27 | +import com.segment.publicapi.Configuration; |
| 28 | +import com.segment.publicapi.auth.*; |
| 29 | +import com.segment.publicapi.models.*; |
| 30 | +import com.segment.publicapi.api.SpaceSchemaApi; |
| 31 | + |
| 32 | +public class Example { |
| 33 | + public static void main(String[] args) { |
| 34 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 35 | + |
| 36 | + // Configure HTTP bearer authorization: token |
| 37 | + HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token"); |
| 38 | + token.setBearerToken("BEARER TOKEN"); |
| 39 | + |
| 40 | + SpaceSchemaApi apiInstance = new SpaceSchemaApi(defaultClient); |
| 41 | + String spaceId = "spaceId"; // String | |
| 42 | + PaginationInput pagination = new PaginationInput(); // PaginationInput | Pagination params. Defaults to count 200. This parameter exists in alpha. |
| 43 | + String sortBy = "lastSeenAt"; // String | Field to sort by. Defaults to 'lastSeenAt'. This parameter exists in alpha. |
| 44 | + String sortDir = "asc"; // String | Sort direction. Defaults to 'desc'. This parameter exists in alpha. |
| 45 | + String search = "search_example"; // String | Filter events by name substring. This parameter exists in alpha. |
| 46 | + try { |
| 47 | + ListEvents200Response result = apiInstance.listEvents(spaceId, pagination, sortBy, sortDir, search); |
| 48 | + System.out.println(result); |
| 49 | + } catch (ApiException e) { |
| 50 | + System.err.println("Exception when calling SpaceSchemaApi#listEvents"); |
| 51 | + System.err.println("Status code: " + e.getCode()); |
| 52 | + System.err.println("Reason: " + e.getResponseBody()); |
| 53 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 54 | + e.printStackTrace(); |
| 55 | + } |
| 56 | + } |
| 57 | +} |
| 58 | +``` |
| 59 | + |
| 60 | +### Parameters |
| 61 | + |
| 62 | + |
| 63 | +| Name | Type | Description | Notes | |
| 64 | +|------------- | ------------- | ------------- | -------------| |
| 65 | +| **spaceId** | **String**| | | |
| 66 | +| **pagination** | [**PaginationInput**](.md)| Pagination params. Defaults to count 200. This parameter exists in alpha. | [optional] | |
| 67 | +| **sortBy** | **String**| Field to sort by. Defaults to 'lastSeenAt'. This parameter exists in alpha. | [optional] [enum: lastSeenAt, name] | |
| 68 | +| **sortDir** | **String**| Sort direction. Defaults to 'desc'. This parameter exists in alpha. | [optional] [enum: asc, desc] | |
| 69 | +| **search** | **String**| Filter events by name substring. This parameter exists in alpha. | [optional] | |
| 70 | + |
| 71 | +### Return type |
| 72 | + |
| 73 | +[**ListEvents200Response**](ListEvents200Response.md) |
| 74 | + |
| 75 | +### Authorization |
| 76 | + |
| 77 | +[token](../README.md#token) |
| 78 | + |
| 79 | +### HTTP request headers |
| 80 | + |
| 81 | +- **Content-Type**: Not defined |
| 82 | +- **Accept**: application/vnd.segment.v1alpha+json, application/json |
| 83 | + |
| 84 | + |
| 85 | +### HTTP response details |
| 86 | +| Status code | Description | Response headers | |
| 87 | +|-------------|-------------|------------------| |
| 88 | +| **200** | OK | - | |
| 89 | +| **404** | Resource not found | - | |
| 90 | +| **422** | Validation failure | - | |
| 91 | +| **429** | Too many requests | - | |
| 92 | + |
| 93 | + |
| 94 | +## Operation: listPropertiesFromEvent |
| 95 | + |
| 96 | +> ListPropertiesFromEvent200Response listPropertiesFromEvent(spaceId, eventName, pagination, sortBy, sortDir, search, includeSampleValues, samplesCount) |
| 97 | +
|
| 98 | +List Properties from Event |
| 99 | + |
| 100 | +Returns a list of Properties for an Event in a Space. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. |
| 101 | + |
| 102 | +### Example |
| 103 | + |
| 104 | +```java |
| 105 | +// Import classes: |
| 106 | +import com.segment.publicapi.ApiClient; |
| 107 | +import com.segment.publicapi.ApiException; |
| 108 | +import com.segment.publicapi.Configuration; |
| 109 | +import com.segment.publicapi.auth.*; |
| 110 | +import com.segment.publicapi.models.*; |
| 111 | +import com.segment.publicapi.api.SpaceSchemaApi; |
| 112 | + |
| 113 | +public class Example { |
| 114 | + public static void main(String[] args) { |
| 115 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 116 | + |
| 117 | + // Configure HTTP bearer authorization: token |
| 118 | + HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token"); |
| 119 | + token.setBearerToken("BEARER TOKEN"); |
| 120 | + |
| 121 | + SpaceSchemaApi apiInstance = new SpaceSchemaApi(defaultClient); |
| 122 | + String spaceId = "spaceId"; // String | |
| 123 | + String eventName = "Order Completed"; // String | |
| 124 | + PaginationInput pagination = new PaginationInput(); // PaginationInput | Pagination params. Defaults to count 200. This parameter exists in alpha. |
| 125 | + String sortBy = "lastSeenAt"; // String | Field to sort by. Defaults to 'lastSeenAt'. This parameter exists in alpha. |
| 126 | + String sortDir = "asc"; // String | Sort direction. Defaults to 'desc'. This parameter exists in alpha. |
| 127 | + String search = "search_example"; // String | Filter properties by name substring. This parameter exists in alpha. |
| 128 | + Boolean includeSampleValues = true; // Boolean | When true, include sample values for each property. Defaults to false. This parameter exists in alpha. |
| 129 | + BigDecimal samplesCount = new BigDecimal(78); // BigDecimal | Max number of sample values to return per property. Defaults to 20, min 1, max 100. This parameter exists in alpha. |
| 130 | + try { |
| 131 | + ListPropertiesFromEvent200Response result = apiInstance.listPropertiesFromEvent(spaceId, eventName, pagination, sortBy, sortDir, search, includeSampleValues, samplesCount); |
| 132 | + System.out.println(result); |
| 133 | + } catch (ApiException e) { |
| 134 | + System.err.println("Exception when calling SpaceSchemaApi#listPropertiesFromEvent"); |
| 135 | + System.err.println("Status code: " + e.getCode()); |
| 136 | + System.err.println("Reason: " + e.getResponseBody()); |
| 137 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 138 | + e.printStackTrace(); |
| 139 | + } |
| 140 | + } |
| 141 | +} |
| 142 | +``` |
| 143 | + |
| 144 | +### Parameters |
| 145 | + |
| 146 | + |
| 147 | +| Name | Type | Description | Notes | |
| 148 | +|------------- | ------------- | ------------- | -------------| |
| 149 | +| **spaceId** | **String**| | | |
| 150 | +| **eventName** | **String**| | | |
| 151 | +| **pagination** | [**PaginationInput**](.md)| Pagination params. Defaults to count 200. This parameter exists in alpha. | [optional] | |
| 152 | +| **sortBy** | **String**| Field to sort by. Defaults to 'lastSeenAt'. This parameter exists in alpha. | [optional] [enum: lastSeenAt, name] | |
| 153 | +| **sortDir** | **String**| Sort direction. Defaults to 'desc'. This parameter exists in alpha. | [optional] [enum: asc, desc] | |
| 154 | +| **search** | **String**| Filter properties by name substring. This parameter exists in alpha. | [optional] | |
| 155 | +| **includeSampleValues** | **Boolean**| When true, include sample values for each property. Defaults to false. This parameter exists in alpha. | [optional] | |
| 156 | +| **samplesCount** | **BigDecimal**| Max number of sample values to return per property. Defaults to 20, min 1, max 100. This parameter exists in alpha. | [optional] | |
| 157 | + |
| 158 | +### Return type |
| 159 | + |
| 160 | +[**ListPropertiesFromEvent200Response**](ListPropertiesFromEvent200Response.md) |
| 161 | + |
| 162 | +### Authorization |
| 163 | + |
| 164 | +[token](../README.md#token) |
| 165 | + |
| 166 | +### HTTP request headers |
| 167 | + |
| 168 | +- **Content-Type**: Not defined |
| 169 | +- **Accept**: application/vnd.segment.v1alpha+json, application/json |
| 170 | + |
| 171 | + |
| 172 | +### HTTP response details |
| 173 | +| Status code | Description | Response headers | |
| 174 | +|-------------|-------------|------------------| |
| 175 | +| **200** | OK | - | |
| 176 | +| **404** | Resource not found | - | |
| 177 | +| **422** | Validation failure | - | |
| 178 | +| **429** | Too many requests | - | |
| 179 | + |
| 180 | + |
| 181 | +## Operation: listSampleValuesFromEventProperty |
| 182 | + |
| 183 | +> ListSampleValuesFromEventProperty200Response listSampleValuesFromEventProperty(spaceId, eventName, propertyName, propertyType) |
| 184 | +
|
| 185 | +List Sample Values from Event Property |
| 186 | + |
| 187 | +Returns sample values for an Event Property in a Space. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. |
| 188 | + |
| 189 | +### Example |
| 190 | + |
| 191 | +```java |
| 192 | +// Import classes: |
| 193 | +import com.segment.publicapi.ApiClient; |
| 194 | +import com.segment.publicapi.ApiException; |
| 195 | +import com.segment.publicapi.Configuration; |
| 196 | +import com.segment.publicapi.auth.*; |
| 197 | +import com.segment.publicapi.models.*; |
| 198 | +import com.segment.publicapi.api.SpaceSchemaApi; |
| 199 | + |
| 200 | +public class Example { |
| 201 | + public static void main(String[] args) { |
| 202 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 203 | + |
| 204 | + // Configure HTTP bearer authorization: token |
| 205 | + HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token"); |
| 206 | + token.setBearerToken("BEARER TOKEN"); |
| 207 | + |
| 208 | + SpaceSchemaApi apiInstance = new SpaceSchemaApi(defaultClient); |
| 209 | + String spaceId = "spaceId"; // String | |
| 210 | + String eventName = "Order Completed"; // String | |
| 211 | + String propertyName = "revenue"; // String | |
| 212 | + EventPropertyType propertyType = EventPropertyType.fromValue("CONTEXT"); // EventPropertyType | The property type. This parameter exists in alpha. |
| 213 | + try { |
| 214 | + ListSampleValuesFromEventProperty200Response result = apiInstance.listSampleValuesFromEventProperty(spaceId, eventName, propertyName, propertyType); |
| 215 | + System.out.println(result); |
| 216 | + } catch (ApiException e) { |
| 217 | + System.err.println("Exception when calling SpaceSchemaApi#listSampleValuesFromEventProperty"); |
| 218 | + System.err.println("Status code: " + e.getCode()); |
| 219 | + System.err.println("Reason: " + e.getResponseBody()); |
| 220 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 221 | + e.printStackTrace(); |
| 222 | + } |
| 223 | + } |
| 224 | +} |
| 225 | +``` |
| 226 | + |
| 227 | +### Parameters |
| 228 | + |
| 229 | + |
| 230 | +| Name | Type | Description | Notes | |
| 231 | +|------------- | ------------- | ------------- | -------------| |
| 232 | +| **spaceId** | **String**| | | |
| 233 | +| **eventName** | **String**| | | |
| 234 | +| **propertyName** | **String**| | | |
| 235 | +| **propertyType** | [**EventPropertyType**](.md)| The property type. This parameter exists in alpha. | [enum: CONTEXT, PROPERTY] | |
| 236 | + |
| 237 | +### Return type |
| 238 | + |
| 239 | +[**ListSampleValuesFromEventProperty200Response**](ListSampleValuesFromEventProperty200Response.md) |
| 240 | + |
| 241 | +### Authorization |
| 242 | + |
| 243 | +[token](../README.md#token) |
| 244 | + |
| 245 | +### HTTP request headers |
| 246 | + |
| 247 | +- **Content-Type**: Not defined |
| 248 | +- **Accept**: application/vnd.segment.v1alpha+json, application/json |
| 249 | + |
| 250 | + |
| 251 | +### HTTP response details |
| 252 | +| Status code | Description | Response headers | |
| 253 | +|-------------|-------------|------------------| |
| 254 | +| **200** | OK | - | |
| 255 | +| **404** | Resource not found | - | |
| 256 | +| **422** | Validation failure | - | |
| 257 | +| **429** | Too many requests | - | |
| 258 | + |
0 commit comments