Skip to content

Commit 85b4728

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@c3865a8a.
1 parent cbf182f commit 85b4728

18 files changed

Lines changed: 3325 additions & 8 deletions

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All endpoints in the API follow REST conventions and use standard HTTP methods.
1010

1111
See the next sections for more information on how to use the Segment Public API Java SDK.
1212

13-
Latest API and SDK version: 73.0.1
13+
Latest API and SDK version: 73.0.2
1414

1515
## Requirements
1616

@@ -28,7 +28,7 @@ Add this dependency to your project's POM:
2828
<dependency>
2929
<groupId>com.segment.publicapi</groupId>
3030
<artifactId>segment-publicapi</artifactId>
31-
<version>73.0.1</version>
31+
<version>73.0.2</version>
3232
<scope>compile</scope>
3333
</dependency>
3434
```
@@ -44,7 +44,7 @@ Add this dependency to your project's build file:
4444
}
4545
4646
dependencies {
47-
implementation "com.segment.publicapi:segment-publicapi:73.0.1"
47+
implementation "com.segment.publicapi:segment-publicapi:73.0.2"
4848
}
4949
```
5050

@@ -58,7 +58,7 @@ mvn clean package
5858

5959
Then manually install the following JARs:
6060

61-
* `target/segment-publicapi-73.0.1.jar`
61+
* `target/segment-publicapi-73.0.2.jar`
6262
* `target/lib/*.jar`
6363

6464
You are now ready to start making calls to Public API!

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
73.0.1
1+
73.0.2

‎docs/SpaceSchemaApi.md‎

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
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 &#39;lastSeenAt&#39;. This parameter exists in alpha. | [optional] [enum: lastSeenAt, name] |
68+
| **sortDir** | **String**| Sort direction. Defaults to &#39;desc&#39;. 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 &#39;lastSeenAt&#39;. This parameter exists in alpha. | [optional] [enum: lastSeenAt, name] |
153+
| **sortDir** | **String**| Sort direction. Defaults to &#39;desc&#39;. 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+

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>segment-publicapi</artifactId>
66
<packaging>jar</packaging>
77
<name>segment-publicapi</name>
8-
<version>73.0.1</version>
8+
<version>73.0.2</version>
99
<url>https://segment.com/docs/api/public-api/</url>
1010
<description>Segment Public API</description>
1111
<scm>

‎src/main/java/com/segment/publicapi/ApiClient.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private void init() {
123123
json = new JSON();
124124

125125
// Set default User-Agent.
126-
setUserAgent("Public API SDK 73.0.1 (Java)");
126+
setUserAgent("Public API SDK 73.0.2 (Java)");
127127

128128
authentications = new HashMap<String, Authentication>();
129129
}

‎src/main/java/com/segment/publicapi/Configuration.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
package com.segment.publicapi;
1313

1414
public class Configuration {
15-
public static final String VERSION = "73.0.1";
15+
public static final String VERSION = "73.0.2";
1616

1717
private static ApiClient defaultApiClient = new ApiClient();
1818

‎src/main/java/com/segment/publicapi/JSON.java‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,10 @@ private static Class getClassByDiscriminator(
736736
new com.segment.publicapi.models.EchoV1Output.CustomTypeAdapterFactory());
737737
gsonBuilder.registerTypeAdapterFactory(
738738
new com.segment.publicapi.models.EntityDetails.CustomTypeAdapterFactory());
739+
gsonBuilder.registerTypeAdapterFactory(
740+
new com.segment.publicapi.models.EventAlpha.CustomTypeAdapterFactory());
741+
gsonBuilder.registerTypeAdapterFactory(
742+
new com.segment.publicapi.models.EventPropertyAlpha.CustomTypeAdapterFactory());
739743
gsonBuilder.registerTypeAdapterFactory(
740744
new com.segment.publicapi.models.EventSourceV1.CustomTypeAdapterFactory());
741745
gsonBuilder.registerTypeAdapterFactory(
@@ -1175,6 +1179,10 @@ private static Class getClassByDiscriminator(
11751179
gsonBuilder.registerTypeAdapterFactory(
11761180
new com.segment.publicapi.models.ListDestinationsV1Output
11771181
.CustomTypeAdapterFactory());
1182+
gsonBuilder.registerTypeAdapterFactory(
1183+
new com.segment.publicapi.models.ListEvents200Response.CustomTypeAdapterFactory());
1184+
gsonBuilder.registerTypeAdapterFactory(
1185+
new com.segment.publicapi.models.ListEventsAlphaOutput.CustomTypeAdapterFactory());
11781186
gsonBuilder.registerTypeAdapterFactory(
11791187
new com.segment.publicapi.models.ListFiltersForSpace200Response
11801188
.CustomTypeAdapterFactory());
@@ -1236,6 +1244,12 @@ private static Class getClassByDiscriminator(
12361244
gsonBuilder.registerTypeAdapterFactory(
12371245
new com.segment.publicapi.models.ListProfilesWarehouseInSpaceAlphaOutput
12381246
.CustomTypeAdapterFactory());
1247+
gsonBuilder.registerTypeAdapterFactory(
1248+
new com.segment.publicapi.models.ListPropertiesFromEvent200Response
1249+
.CustomTypeAdapterFactory());
1250+
gsonBuilder.registerTypeAdapterFactory(
1251+
new com.segment.publicapi.models.ListPropertiesFromEventAlphaOutput
1252+
.CustomTypeAdapterFactory());
12391253
gsonBuilder.registerTypeAdapterFactory(
12401254
new com.segment.publicapi.models.ListRegulationsFromSource200Response
12411255
.CustomTypeAdapterFactory());
@@ -1266,6 +1280,12 @@ private static Class getClassByDiscriminator(
12661280
gsonBuilder.registerTypeAdapterFactory(
12671281
new com.segment.publicapi.models.ListRulesFromTrackingPlanV1Output
12681282
.CustomTypeAdapterFactory());
1283+
gsonBuilder.registerTypeAdapterFactory(
1284+
new com.segment.publicapi.models.ListSampleValuesFromEventProperty200Response
1285+
.CustomTypeAdapterFactory());
1286+
gsonBuilder.registerTypeAdapterFactory(
1287+
new com.segment.publicapi.models.ListSampleValuesFromEventPropertyAlphaOutput
1288+
.CustomTypeAdapterFactory());
12691289
gsonBuilder.registerTypeAdapterFactory(
12701290
new com.segment.publicapi.models.ListSchemaSettingsInSource200Response
12711291
.CustomTypeAdapterFactory());

0 commit comments

Comments
 (0)