@@ -65,18 +65,21 @@ createSegmentResponse:
65
65
segment :
66
66
type : object
67
67
required :
68
+ - version
68
69
- segmentID
69
70
- name
70
71
- conditions
71
72
- segmentStatus
72
73
- type
73
74
properties :
75
+ version :
76
+ $ref : ' #/segmentVersion'
74
77
segmentID :
75
78
$ref : ' #/segmentID'
76
79
name :
77
- type : string
80
+ $ref : ' #/segmentName '
78
81
conditions :
79
- type : string
82
+ $ref : ' #/segmentParentConditions '
80
83
segmentStatus :
81
84
$ref : ' #/segmentStatus'
82
85
type :
@@ -86,25 +89,259 @@ segment:
86
89
87
90
segmentStatus :
88
91
type : string
92
+ description : The status of the segment.
89
93
enum :
90
94
- active
91
95
- pending
92
96
- failed
93
97
94
98
segmentType :
95
99
type : string
100
+ description : The type of the segment.
96
101
enum :
97
102
- computed
98
103
- custom
99
104
105
+ segmentVersion :
106
+ type : number
107
+ format : float
108
+ description : The segment syntax version.
109
+ example : 1.1
110
+
100
111
segmentID :
101
112
type : string
102
113
description : The ID of the segment.
103
114
115
+ segmentName :
116
+ type : string
117
+ description : The name of the segment.
118
+
104
119
updatedAt :
105
120
type : string
106
- description : The date and time at which the segment was last updated.
121
+ description : The date and time at which the segment was last updated (RFC3339).
122
+ example : 2021-07-22T12:30:00Z
107
123
108
124
deletedUntil :
109
125
type : string
110
126
description : The date and time at which the segment will be re-ingested.
127
+ example : 2021-07-22T12:30:00Z
128
+
129
+ segmentParentConditions :
130
+ description : |
131
+ The conditions that define which user profiles are included in the segment.
132
+
133
+ Can contain operands and a maximum of 1 level of nested conditions.
134
+ type : object
135
+ required :
136
+ - operator
137
+ - operands
138
+ properties :
139
+ operator :
140
+ $ref : ' #/segmentConditionOperator'
141
+ operands :
142
+ type : array
143
+ items :
144
+ $ref : ' #/segmentParentConditionOperands'
145
+
146
+ segmentChildConditions :
147
+ description : Nested segment conditions that only contain operands.
148
+ type : object
149
+ required :
150
+ - operator
151
+ - operands
152
+ properties :
153
+ operator :
154
+ $ref : ' #/segmentConditionOperator'
155
+ operands :
156
+ type : array
157
+ items :
158
+ $ref : ' #/segmentChildConditionOperands'
159
+
160
+ segmentConditionOperator :
161
+ description : Operator used to combine the operands.
162
+ type : string
163
+ enum :
164
+ - AND
165
+ - OR
166
+
167
+ segmentParentConditionOperands :
168
+ oneOf :
169
+ - $ref : ' #/segmentChildConditions'
170
+ - $ref : ' #/segmentOperandAffinity'
171
+ - $ref : ' #/segmentOperandFunnelStage'
172
+ - $ref : ' #/segmentOperandOrderValue'
173
+ - $ref : ' #/segmentOperandProperty'
174
+
175
+ segmentChildConditionOperands :
176
+ oneOf :
177
+ - $ref : ' #/segmentOperandAffinity'
178
+ - $ref : ' #/segmentOperandFunnelStage'
179
+ - $ref : ' #/segmentOperandOrderValue'
180
+ - $ref : ' #/segmentOperandProperty'
181
+
182
+ segmentOperandAffinity :
183
+ description : Operand for affinity model predictions.
184
+ type : object
185
+ required :
186
+ - name
187
+ - filters
188
+ properties :
189
+ name :
190
+ type : string
191
+ pattern : ^predictions\.affinities\.\w+$
192
+ example : predictions.affinities.color
193
+ filters :
194
+ type : array
195
+ minItems : 1
196
+ items :
197
+ $ref : ' #/segmentAffinityFilter'
198
+
199
+ segmentOperandFunnelStage :
200
+ description : Operand for funnel stage model predictions.
201
+ type : object
202
+ required :
203
+ - name
204
+ - filters
205
+ properties :
206
+ name :
207
+ type : string
208
+ pattern : ^predictions\.funnel_stage$
209
+ example : predictions.funnel_stage
210
+ filters :
211
+ type : array
212
+ minItems : 1
213
+ items :
214
+ $ref : ' #/segmentFunnelStageFilter'
215
+
216
+ segmentOperandOrderValue :
217
+ description : Operand for order value model predictions.
218
+ type : object
219
+ required :
220
+ - name
221
+ - filters
222
+ properties :
223
+ name :
224
+ type : string
225
+ pattern : ^predictions\.order_value$
226
+ example : predictions.order_value
227
+ filters :
228
+ type : array
229
+ minItems : 1
230
+ items :
231
+ $ref : ' #/segmentOrderValueFilter'
232
+
233
+ segmentOperandProperty :
234
+ description : Operand for user profile properties.
235
+ type : object
236
+ required :
237
+ - name
238
+ - filters
239
+ properties :
240
+ name :
241
+ type : string
242
+ pattern : ^properties\.(raw|computed|custom)\.\w+$
243
+ example : properties.raw.age
244
+ filters :
245
+ type : array
246
+ minItems : 1
247
+ items :
248
+ $ref : ' #/segmentPropertyFilter'
249
+
250
+ segmentAffinityFilter :
251
+ description : Filter for affinity model predictions.
252
+ type : object
253
+ required :
254
+ - value
255
+ - probability
256
+ properties :
257
+ operator :
258
+ $ref : ' #/segmentFilterOperatorNumerical'
259
+ value :
260
+ $ref : ' #/segmentAffinityFilterValue'
261
+ probability :
262
+ $ref : ' #/segmentFilterProbability'
263
+
264
+ segmentAffinityFilterValue :
265
+ oneOf :
266
+ - type : string
267
+ - type : number
268
+ format : float
269
+ - type : array
270
+ items :
271
+ type : string
272
+ - type : boolean
273
+
274
+ segmentFunnelStageFilter :
275
+ description : Filter for funnel stage model predictions.
276
+ type : object
277
+ required :
278
+ - value
279
+ - probability
280
+ properties :
281
+ operator :
282
+ $ref : ' #/segmentFilterOperatorBoolean'
283
+ value :
284
+ type : string
285
+ probability :
286
+ $ref : ' #/segmentFilterProbability'
287
+
288
+ segmentOrderValueFilter :
289
+ description : Filter for order value model predictions.
290
+ type : object
291
+ required :
292
+ - value
293
+ properties :
294
+ operator :
295
+ $ref : ' #/segmentFilterOperatorNumerical'
296
+ value :
297
+ type : number
298
+
299
+ segmentPropertyFilter :
300
+ description : Filter for user profile properties.
301
+ type : object
302
+ required :
303
+ - value
304
+ properties :
305
+ operator :
306
+ $ref : ' #/segmentFilterOperatorNumerical'
307
+ value :
308
+ $ref : ' #/segmentPropertyFilterValue'
309
+
310
+ segmentPropertyFilterValue :
311
+ allOf :
312
+ - $ref : ' #/segmentAffinityFilterValue'
313
+
314
+ segmentFilterOperatorBoolean :
315
+ description : The operator used on the boolean filter value.
316
+ type : string
317
+ default : =
318
+ enum :
319
+ - =
320
+ - ' !='
321
+
322
+ segmentFilterOperatorNumerical :
323
+ description : The operator used on the numerical filter value.
324
+ type : string
325
+ default : =
326
+ enum :
327
+ - =
328
+ - ' !='
329
+ - ' >'
330
+ - ' >='
331
+ - <
332
+ - <=
333
+
334
+ segmentFilterProbability :
335
+ description : Probability of the filter.
336
+ type : object
337
+ minProperties : 1
338
+ maxProperties : 2
339
+ properties :
340
+ lt :
341
+ type : number
342
+ lte :
343
+ type : number
344
+ gt :
345
+ type : number
346
+ gte :
347
+ type : number
0 commit comments