suggestgrid 0.1.15.pre.SNAPSHOT → 0.1.17.pre.SNAPSHOT
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/suggest_grid/api_helper.rb +2 -2
- data/lib/suggest_grid/configuration.rb +1 -1
- data/lib/suggest_grid/controllers/action_controller.rb +24 -18
- data/lib/suggest_grid/controllers/metadata_controller.rb +36 -32
- data/lib/suggest_grid/controllers/recommendation_controller.rb +12 -12
- data/lib/suggest_grid/controllers/similarity_controller.rb +12 -12
- data/lib/suggest_grid/controllers/type_controller.rb +12 -12
- data/lib/suggest_grid/exceptions/bulk_schema_error_response_exception.rb +37 -0
- data/lib/suggest_grid/exceptions/detailed_error_response_exception.rb +42 -0
- data/lib/suggest_grid/exceptions/error_response_exception.rb +37 -0
- data/lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb +47 -0
- data/lib/suggest_grid/models/action.rb +15 -19
- data/lib/suggest_grid/models/base_model.rb +32 -0
- data/lib/suggest_grid/models/count_response.rb +12 -16
- data/lib/suggest_grid/models/delete_error_response.rb +80 -0
- data/lib/suggest_grid/models/delete_success_response.rb +62 -0
- data/lib/suggest_grid/models/get_recommended_items_body.rb +39 -32
- data/lib/suggest_grid/models/get_recommended_users_body.rb +39 -32
- data/lib/suggest_grid/models/get_similar_items_body.rb +27 -30
- data/lib/suggest_grid/models/get_similar_users_body.rb +27 -30
- data/lib/suggest_grid/models/get_type_response.rb +12 -16
- data/lib/suggest_grid/models/get_types_response.rb +12 -16
- data/lib/suggest_grid/models/items_response.rb +12 -16
- data/lib/suggest_grid/models/message_response.rb +11 -15
- data/lib/suggest_grid/models/metadata.rb +34 -39
- data/lib/suggest_grid/models/metadata_information_response.rb +11 -15
- data/lib/suggest_grid/models/schema_error_response.rb +13 -17
- data/lib/suggest_grid/models/type_request_body.rb +12 -15
- data/lib/suggest_grid/models/users_response.rb +12 -16
- data/lib/suggest_grid.rb +7 -2
- data/spec/swagger.yaml +235 -121
- metadata +10 -5
- data/lib/suggest_grid/models/bulk_schema_error_response.rb +0 -53
- data/lib/suggest_grid/models/error_response.rb +0 -48
data/spec/swagger.yaml
CHANGED
@@ -2,8 +2,8 @@ swagger: '2.0'
|
|
2
2
|
|
3
3
|
info:
|
4
4
|
title: SuggestGrid
|
5
|
-
version: 0.1.
|
6
|
-
description: SuggestGrid is
|
5
|
+
version: 0.1.17-SNAPSHOT
|
6
|
+
description: SuggestGrid is a recommendation and personalization service.
|
7
7
|
x-codegen-settings:
|
8
8
|
appendContentHeaders: true
|
9
9
|
generateAsyncCode: true
|
@@ -22,15 +22,13 @@ info:
|
|
22
22
|
enableAdditionalModelProperties: false
|
23
23
|
preserveParameterOrder: true
|
24
24
|
|
25
|
-
host: localhost:9090
|
26
|
-
|
27
25
|
schemes:
|
28
|
-
-
|
26
|
+
- https
|
29
27
|
|
30
28
|
securityDefinitions:
|
31
29
|
basicAuth:
|
32
30
|
type: basic
|
33
|
-
description: HTTP Basic Authentication.
|
31
|
+
description: HTTP Basic Authentication.
|
34
32
|
|
35
33
|
security:
|
36
34
|
- basicAuth: []
|
@@ -99,7 +97,9 @@ tags:
|
|
99
97
|
definitions:
|
100
98
|
Action:
|
101
99
|
type: object
|
102
|
-
description:
|
100
|
+
description: |
|
101
|
+
An action object represents a user's action on an item.
|
102
|
+
All actions belong to a type that gives meaning to actions.
|
103
103
|
properties:
|
104
104
|
type:
|
105
105
|
type: string
|
@@ -112,7 +112,7 @@ definitions:
|
|
112
112
|
description: The item id of the item the action is performed on.
|
113
113
|
rating:
|
114
114
|
type: number
|
115
|
-
description: The optional rating, if the type is explicit.
|
115
|
+
description: The optional rating given by the user, if the type is explicit.
|
116
116
|
required:
|
117
117
|
- type
|
118
118
|
- user_id
|
@@ -120,6 +120,8 @@ definitions:
|
|
120
120
|
Filter:
|
121
121
|
type: object
|
122
122
|
description: |
|
123
|
+
Contraints on the returned users or items.
|
124
|
+
Filter structure is defined in [the filter parameter documentation](http://www.suggestgrid.com/docs/concepts#filters-parameter).
|
123
125
|
additionalProperties:
|
124
126
|
type:
|
125
127
|
- string
|
@@ -128,11 +130,13 @@ definitions:
|
|
128
130
|
- boolean
|
129
131
|
Metadata:
|
130
132
|
type: object
|
131
|
-
description:
|
133
|
+
description: A metadata for a user or an item.
|
132
134
|
properties:
|
133
135
|
id:
|
134
136
|
type: string
|
135
137
|
description: |
|
138
|
+
The id of the user or the item that the metadata is associated with.
|
139
|
+
Id parameter is necessary for all metadata.
|
136
140
|
additionalProperties:
|
137
141
|
type:
|
138
142
|
- string
|
@@ -144,187 +148,277 @@ definitions:
|
|
144
148
|
# Request Bodies
|
145
149
|
TypeRequestBody:
|
146
150
|
type: object
|
147
|
-
description:
|
151
|
+
description: Options for creating a type.
|
148
152
|
properties:
|
149
153
|
rating:
|
150
154
|
type: string
|
151
|
-
description:
|
155
|
+
description: |
|
156
|
+
The rating type of the type to be created.
|
152
157
|
Could be "explicit" or "implicit"
|
153
158
|
The default is "implicit".
|
154
159
|
GetRecommendedUsersBody:
|
155
160
|
type: object
|
156
|
-
description:
|
161
|
+
description: Query for recommended users.
|
157
162
|
properties:
|
158
163
|
type:
|
159
164
|
type: string
|
160
|
-
description:
|
165
|
+
description: The type of the query.
|
161
166
|
types:
|
162
167
|
type: string
|
163
|
-
description:
|
168
|
+
description: The types of the query. Exactly one of type or types parameters must be provided.
|
164
169
|
item_id:
|
165
170
|
type: string
|
166
|
-
description:
|
171
|
+
description: The item id of the query.
|
167
172
|
item_ids:
|
168
173
|
type: array
|
169
|
-
description:
|
174
|
+
description: The item ids of the query. Exactly one of item id or item ids parameters must be provided.
|
170
175
|
items:
|
171
176
|
type: string
|
172
177
|
size:
|
173
178
|
type: integer
|
174
|
-
description:
|
179
|
+
description: The number of users asked to return in the response.
|
175
180
|
similar_user_id:
|
181
|
+
type: string
|
182
|
+
description: Similar user that the response should be similar to.
|
183
|
+
similar_user_ids:
|
176
184
|
type: string
|
177
185
|
description: |
|
186
|
+
Similar users that the response should be similar to.
|
187
|
+
At most one of similar user and similar users parameters can be provided.
|
178
188
|
fields:
|
179
189
|
type: array
|
180
190
|
items:
|
181
191
|
type: string
|
182
|
-
description:
|
192
|
+
description: The metadata fields that are to be included in returned users.
|
183
193
|
filter:
|
184
194
|
$ref: '#/definitions/Filter'
|
185
195
|
except:
|
186
196
|
type: array
|
187
197
|
items:
|
188
198
|
type: string
|
189
|
-
description:
|
190
|
-
These ids will not be included in the response.
|
199
|
+
description: These user ids that will not be included in the response.
|
191
200
|
GetRecommendedItemsBody:
|
192
201
|
type: object
|
193
|
-
description:
|
202
|
+
description: Query for recommended items.
|
194
203
|
properties:
|
195
204
|
type:
|
196
205
|
type: string
|
197
|
-
description:
|
206
|
+
description: The type of the query.
|
198
207
|
types:
|
199
208
|
type: string
|
200
|
-
description:
|
209
|
+
description: The types of the query. Exactly one of type or types parameters must be provided.
|
201
210
|
user_id:
|
202
211
|
type: string
|
203
|
-
description:
|
212
|
+
description: The user id of the query.
|
204
213
|
user_ids:
|
205
214
|
type: array
|
206
|
-
description:
|
215
|
+
description: The user ids of the query. Exactly one of user id or user ids parameters must be provided.
|
207
216
|
items:
|
208
217
|
type: string
|
209
218
|
size:
|
210
219
|
type: integer
|
211
|
-
description:
|
220
|
+
description: The number of users asked to return in the response.
|
212
221
|
similar_item_id:
|
222
|
+
type: string
|
223
|
+
description: Similar item that the response should be similar to.
|
224
|
+
similar_item_ids:
|
213
225
|
type: string
|
214
226
|
description: |
|
227
|
+
Similar items that the response should be similar to.
|
228
|
+
At most one of similar item and similar items parameters can be provided.
|
215
229
|
fields:
|
216
230
|
type: array
|
217
231
|
items:
|
218
232
|
type: string
|
219
|
-
description:
|
233
|
+
description: The metadata fields that are to be included in returned users.
|
220
234
|
filter:
|
221
235
|
$ref: '#/definitions/Filter'
|
222
236
|
except:
|
223
237
|
type: array
|
224
238
|
items:
|
225
239
|
type: string
|
226
|
-
description:
|
227
|
-
These ids will not be included in the response.
|
240
|
+
description: These user ids that will not be included in the response.
|
228
241
|
GetSimilarUsersBody:
|
229
242
|
type: object
|
230
|
-
description:
|
243
|
+
description: The query for similar users.
|
231
244
|
properties:
|
232
245
|
type:
|
233
246
|
type: string
|
234
|
-
description:
|
247
|
+
description: The type of the query.
|
235
248
|
types:
|
236
249
|
type: string
|
237
|
-
description:
|
250
|
+
description: The types of the query. Exactly one of type or types parameters must be provided.
|
238
251
|
user_id:
|
239
252
|
type: string
|
240
|
-
description:
|
253
|
+
description: The user id of the query.
|
241
254
|
user_ids:
|
242
255
|
type: array
|
243
|
-
description:
|
256
|
+
description: The user ids of the query. Exactly one of user id or user ids parameters must be provided.
|
244
257
|
items:
|
245
258
|
type: string
|
246
259
|
size:
|
247
260
|
type: integer
|
248
|
-
description:
|
261
|
+
description: The number of users asked to return in the response.
|
249
262
|
fields:
|
250
263
|
type: array
|
251
264
|
items:
|
252
265
|
type: string
|
253
|
-
description:
|
266
|
+
description: The metadata fields that are to be included in returned users.
|
254
267
|
filter:
|
255
268
|
$ref: '#/definitions/Filter'
|
256
269
|
except:
|
257
270
|
type: array
|
258
271
|
items:
|
259
272
|
type: string
|
260
|
-
description:
|
261
|
-
These ids will not be included in the response.
|
273
|
+
description: These user ids that will not be included in the response.
|
262
274
|
GetSimilarItemsBody:
|
263
275
|
type: object
|
264
|
-
description:
|
276
|
+
description: The query for similar items.
|
265
277
|
properties:
|
266
278
|
type:
|
267
279
|
type: string
|
268
|
-
description:
|
280
|
+
description: The type of the query.
|
269
281
|
types:
|
270
282
|
type: string
|
271
|
-
description:
|
283
|
+
description: The types of the query. Exactly one of type or types parameters must be provided.
|
272
284
|
item_id:
|
273
285
|
type: string
|
274
|
-
description:
|
286
|
+
description: The item id of the query.
|
275
287
|
Get similar items to given item id. Either item id or item ids must be provided.
|
276
288
|
item_ids:
|
277
289
|
type: array
|
278
|
-
description:
|
290
|
+
description: The item ids of the query. Exactly one of item id or item ids parameters must be provided.
|
279
291
|
Get similar items to given item ids. Either item id or item ids must be provided.
|
280
292
|
items:
|
281
293
|
type: string
|
282
294
|
size:
|
283
295
|
type: integer
|
284
|
-
description:
|
296
|
+
description: The number of users asked to return in the response.
|
285
297
|
fields:
|
286
298
|
type: array
|
287
299
|
items:
|
288
300
|
type: string
|
289
|
-
description:
|
301
|
+
description: The metadata fields that are to be included in returned users.
|
290
302
|
filter:
|
291
303
|
$ref: '#/definitions/Filter'
|
292
304
|
except:
|
293
305
|
type: array
|
294
306
|
items:
|
295
307
|
type: string
|
296
|
-
description:
|
297
|
-
These ids will not be included in the response.
|
308
|
+
description: These user ids that will not be included in the response.
|
298
309
|
# Responses
|
299
310
|
MessageResponse:
|
300
311
|
type: object
|
301
|
-
description:
|
312
|
+
description: A basic response.
|
302
313
|
properties:
|
303
314
|
message:
|
304
315
|
type: string
|
305
316
|
description: Message of the response.
|
306
317
|
CountResponse:
|
307
318
|
type: object
|
308
|
-
description:
|
319
|
+
description: Count response.
|
309
320
|
properties:
|
310
321
|
count:
|
311
322
|
type: integer
|
312
323
|
format: int32
|
313
|
-
description:
|
324
|
+
description: The count that is asked in the query.
|
314
325
|
ErrorResponse:
|
315
326
|
type: object
|
316
|
-
description:
|
327
|
+
description: Error response.
|
328
|
+
properties:
|
329
|
+
error_text:
|
330
|
+
type: string
|
331
|
+
description: Message of the response.
|
332
|
+
error_description:
|
333
|
+
type: string
|
334
|
+
description: Description of the response.
|
335
|
+
error_uri:
|
336
|
+
type: string
|
337
|
+
description: URI of the response for more details.
|
338
|
+
DetailedErrorResponse:
|
339
|
+
type: object
|
340
|
+
description: Error response.
|
341
|
+
properties:
|
342
|
+
error_text:
|
343
|
+
type: string
|
344
|
+
description: Message of the response.
|
345
|
+
error_description:
|
346
|
+
type: string
|
347
|
+
description: Description of the response.
|
348
|
+
error_uri:
|
349
|
+
type: string
|
350
|
+
description: URI of the response for more details.
|
351
|
+
error_details:
|
352
|
+
type: string
|
353
|
+
description: Specific details of the response.
|
354
|
+
LimitExceededErrorResponse:
|
355
|
+
type: object
|
356
|
+
description: Error response.
|
357
|
+
properties:
|
358
|
+
error_text:
|
359
|
+
type: string
|
360
|
+
description: Message of the response.
|
361
|
+
error_description:
|
362
|
+
type: string
|
363
|
+
description: Description of the response.
|
364
|
+
error_uri:
|
365
|
+
type: string
|
366
|
+
description: URI of the response for more details.
|
367
|
+
used:
|
368
|
+
type: integer
|
369
|
+
format: int32
|
370
|
+
description: The quantity used by the account.
|
371
|
+
limit:
|
372
|
+
type: integer
|
373
|
+
format: int32
|
374
|
+
description: The limit quantity of the account.
|
375
|
+
DeleteErrorResponse:
|
376
|
+
type: object
|
377
|
+
description: Error response with found, deleted, and failed parameters.
|
378
|
+
properties:
|
379
|
+
error_text:
|
380
|
+
type: string
|
381
|
+
description: Message of the response.
|
382
|
+
error_description:
|
383
|
+
type: string
|
384
|
+
description: Description of the response.
|
385
|
+
error_uri:
|
386
|
+
type: string
|
387
|
+
description: URI of the response for more details.
|
388
|
+
found:
|
389
|
+
type: integer
|
390
|
+
format: int32
|
391
|
+
description: The number of records found for the delete query.
|
392
|
+
deleted:
|
393
|
+
type: integer
|
394
|
+
format: int32
|
395
|
+
description: The number of records deleted for the delete query.
|
396
|
+
failed:
|
397
|
+
type: integer
|
398
|
+
format: int32
|
399
|
+
description: The number of records found but not deleted for the delete query.
|
400
|
+
DeleteSuccessResponse:
|
401
|
+
type: object
|
402
|
+
description: Successful delete response with found, deleted, and failed parameters.
|
317
403
|
properties:
|
318
404
|
message:
|
319
405
|
type: string
|
320
406
|
description: Message of the response.
|
321
|
-
|
407
|
+
found:
|
322
408
|
type: integer
|
323
409
|
format: int32
|
324
|
-
description:
|
410
|
+
description: The number of records found for the delete query.
|
411
|
+
deleted:
|
412
|
+
type: integer
|
413
|
+
format: int32
|
414
|
+
description: The number of records deleted for the delete query.
|
415
|
+
failed:
|
416
|
+
type: integer
|
417
|
+
format: int32
|
418
|
+
description: The number of records found but not deleted for the delete query.
|
325
419
|
GetTypesResponse:
|
326
420
|
type: object
|
327
|
-
description:
|
421
|
+
description: Type names response.
|
328
422
|
properties:
|
329
423
|
types:
|
330
424
|
type: array
|
@@ -337,14 +431,16 @@ definitions:
|
|
337
431
|
description: Status code of the response. It is not 2XX.
|
338
432
|
GetTypeResponse:
|
339
433
|
type: object
|
340
|
-
description:
|
434
|
+
description: Get type details response.
|
341
435
|
properties:
|
342
436
|
rating:
|
343
437
|
type: string
|
344
|
-
description:
|
438
|
+
description: Rating type of the type that is either implicit or explicit.
|
345
439
|
BulkSchemaErrorResponse:
|
346
440
|
type: object
|
347
441
|
description: |
|
442
|
+
Bulk error response.
|
443
|
+
Returned on bulk post requests with failures.
|
348
444
|
properties:
|
349
445
|
message:
|
350
446
|
type: string
|
@@ -368,7 +464,7 @@ definitions:
|
|
368
464
|
description: Programatic description of the error.
|
369
465
|
MetadataInformationResponse:
|
370
466
|
type: object
|
371
|
-
description:
|
467
|
+
description: Metadata iformation response.
|
372
468
|
properties:
|
373
469
|
count:
|
374
470
|
type: integer
|
@@ -376,7 +472,7 @@ definitions:
|
|
376
472
|
description: The number of users or items with metadata.
|
377
473
|
UsersResponse:
|
378
474
|
type: object
|
379
|
-
description:
|
475
|
+
description: Users response.
|
380
476
|
properties:
|
381
477
|
count:
|
382
478
|
type: integer
|
@@ -388,7 +484,7 @@ definitions:
|
|
388
484
|
$ref: '#/definitions/Metadata'
|
389
485
|
ItemsResponse:
|
390
486
|
type: object
|
391
|
-
description:
|
487
|
+
description: Items response.
|
392
488
|
properties:
|
393
489
|
count:
|
394
490
|
type: integer
|
@@ -407,7 +503,7 @@ paths:
|
|
407
503
|
- type
|
408
504
|
operationId: get_all_types
|
409
505
|
summary: Get All Types
|
410
|
-
description:
|
506
|
+
description: Returns all type names in an array named types.
|
411
507
|
responses:
|
412
508
|
200:
|
413
509
|
description: Get types response.
|
@@ -426,7 +522,7 @@ paths:
|
|
426
522
|
- type
|
427
523
|
operationId: delete_all_types
|
428
524
|
summary: Delete All Types
|
429
|
-
description: Deletes ALL types and ALL actions.
|
525
|
+
description: Deletes ALL the types and ALL the actions.
|
430
526
|
responses:
|
431
527
|
200:
|
432
528
|
description: Get types response.
|
@@ -446,7 +542,7 @@ paths:
|
|
446
542
|
- type
|
447
543
|
operationId: get_type
|
448
544
|
summary: Get Properties of a Type
|
449
|
-
description:
|
545
|
+
description: Returns the options of a type. The response rating parameter.
|
450
546
|
parameters:
|
451
547
|
- name: type
|
452
548
|
in: path
|
@@ -472,7 +568,7 @@ paths:
|
|
472
568
|
- type
|
473
569
|
operationId: create_type
|
474
570
|
summary: Create a New Type
|
475
|
-
description: Creates a new
|
571
|
+
description: Creates a new type.
|
476
572
|
parameters:
|
477
573
|
- name: type
|
478
574
|
in: path
|
@@ -480,21 +576,21 @@ paths:
|
|
480
576
|
required: true
|
481
577
|
type: string
|
482
578
|
format: id
|
483
|
-
- name:
|
579
|
+
- name: settings
|
484
580
|
in: body
|
485
|
-
description: Optional
|
581
|
+
description: Optional settings for the rating parameter.
|
486
582
|
required: false
|
487
583
|
schema:
|
488
584
|
$ref: '#/definitions/TypeRequestBody'
|
489
585
|
responses:
|
490
|
-
|
586
|
+
201:
|
491
587
|
description: Type is created.
|
492
588
|
schema:
|
493
589
|
$ref: '#/definitions/MessageResponse'
|
494
590
|
402:
|
495
591
|
description: Type limit reached.
|
496
592
|
schema:
|
497
|
-
$ref: '#/definitions/
|
593
|
+
$ref: '#/definitions/LimitExceededErrorResponse'
|
498
594
|
409:
|
499
595
|
description: Type already exists.
|
500
596
|
schema:
|
@@ -555,15 +651,15 @@ paths:
|
|
555
651
|
The body must have user id, item id and type.
|
556
652
|
Rating is required for actions sent to an explicit type.
|
557
653
|
parameters:
|
558
|
-
- name:
|
654
|
+
- name: action
|
559
655
|
in: body
|
560
656
|
description: The action to be posted.
|
561
657
|
required: true
|
562
658
|
schema:
|
563
659
|
$ref: '#/definitions/Action'
|
564
660
|
responses:
|
565
|
-
|
566
|
-
description:
|
661
|
+
201:
|
662
|
+
description: An action is created.
|
567
663
|
schema:
|
568
664
|
$ref: '#/definitions/MessageResponse'
|
569
665
|
400:
|
@@ -592,14 +688,14 @@ paths:
|
|
592
688
|
operationId: get_actions
|
593
689
|
summary: Get Actions
|
594
690
|
description: |
|
595
|
-
|
691
|
+
Type must be provided. Additionally,
|
596
692
|
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
693
|
+
* If both `user_id` and `item_id` are supplied it returns the count of the corresponding actions.
|
694
|
+
* If only `user_id` is provided, it returns the count of all the action of the given user.
|
695
|
+
* If only `user_id` is provided, it returns the count of all the action of the given item.
|
696
|
+
* If only `older_than` is provided, it returns the count of actions older than the given timestamp.
|
697
|
+
* If a few of these parameters are provided, it returns the count of the intersection of these parameters.
|
698
|
+
* If none of these are provided, it returns the count of the whole type.
|
603
699
|
parameters:
|
604
700
|
- name: type
|
605
701
|
in: query
|
@@ -622,8 +718,8 @@ paths:
|
|
622
718
|
- name: older_than
|
623
719
|
in: query
|
624
720
|
description: |
|
625
|
-
|
626
|
-
|
721
|
+
Delete all actions of a type older than the given timestamp or time.
|
722
|
+
Valid times are 1s, 1m, 1h, 1d, 1M, 1y, or unix timestamp (like 1443798195).
|
627
723
|
required: false
|
628
724
|
type: string
|
629
725
|
format: id
|
@@ -650,14 +746,14 @@ paths:
|
|
650
746
|
operationId: delete_actions
|
651
747
|
summary: Delete Actions
|
652
748
|
description: |
|
653
|
-
|
749
|
+
Type must be provided. Additionally,
|
654
750
|
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
751
|
+
* If both user id and item id are supplied the user's actions on the item will be deleted.
|
752
|
+
* If only user id is provided, all actions of the user will be deleted.
|
753
|
+
* If only item id is provided, all actions on the item will be deleted.
|
754
|
+
* If only older than is provided, all actions older than the timestamp or the duration will be deleted.
|
755
|
+
* If a few of these parameters are provided, delete action will be executed within intersection of these parameters.
|
756
|
+
* One of these parameters must be provided. In order to delete all actions, delete the type.
|
661
757
|
parameters:
|
662
758
|
- name: type
|
663
759
|
in: query
|
@@ -680,8 +776,8 @@ paths:
|
|
680
776
|
- name: older_than
|
681
777
|
in: query
|
682
778
|
description: |
|
683
|
-
|
684
|
-
|
779
|
+
Delete all actions of a type older than the given timestamp or time.
|
780
|
+
Valid times are 1s, 1m, 1h, 1d, 1M, 1y, or unix timestamp (like 1443798195).
|
685
781
|
required: false
|
686
782
|
type: string
|
687
783
|
format: id
|
@@ -706,6 +802,10 @@ paths:
|
|
706
802
|
description: Too many requests.
|
707
803
|
schema:
|
708
804
|
$ref: '#/definitions/ErrorResponse'
|
805
|
+
505:
|
806
|
+
description: Request timed out.
|
807
|
+
schema:
|
808
|
+
$ref: '#/definitions/ErrorResponse'
|
709
809
|
default:
|
710
810
|
description: Unexpected internal error.
|
711
811
|
schema:
|
@@ -722,7 +822,7 @@ paths:
|
|
722
822
|
consumes:
|
723
823
|
- text/plain; charset=utf-8
|
724
824
|
parameters:
|
725
|
-
- name:
|
825
|
+
- name: actions
|
726
826
|
in: body
|
727
827
|
description: |
|
728
828
|
A number of action objects separated with newlines.
|
@@ -732,10 +832,18 @@ paths:
|
|
732
832
|
schema:
|
733
833
|
type: string
|
734
834
|
responses:
|
735
|
-
|
835
|
+
201:
|
736
836
|
description: Bulk action request executed.
|
737
837
|
schema:
|
738
838
|
$ref: '#/definitions/MessageResponse'
|
839
|
+
209:
|
840
|
+
description: Some metadata is not uploaded successfully.
|
841
|
+
schema:
|
842
|
+
$ref: '#/definitions/BulkSchemaErrorResponse'
|
843
|
+
400:
|
844
|
+
description: Body is missing.
|
845
|
+
schema:
|
846
|
+
$ref: '#/definitions/ErrorResponse'
|
739
847
|
402:
|
740
848
|
description: Action limit exceeded.
|
741
849
|
schema:
|
@@ -755,11 +863,11 @@ paths:
|
|
755
863
|
- metadata
|
756
864
|
operationId: delete_user
|
757
865
|
summary: Delete a User
|
758
|
-
description:
|
866
|
+
description: Deletes a user metadata with the given user id.
|
759
867
|
parameters:
|
760
868
|
- name: user_id
|
761
869
|
in: path
|
762
|
-
description: The
|
870
|
+
description: The user id to delete its metadata.
|
763
871
|
required: true
|
764
872
|
type: string
|
765
873
|
format: id
|
@@ -784,21 +892,21 @@ paths:
|
|
784
892
|
summary: Post a User
|
785
893
|
description: Posts a user metadata.
|
786
894
|
parameters:
|
787
|
-
- name:
|
895
|
+
- name: user
|
788
896
|
in: body
|
789
897
|
description: The metadata to be saved. Metadata format has its restrictions.
|
790
898
|
required: true
|
791
899
|
schema:
|
792
900
|
$ref: '#/definitions/Metadata'
|
793
901
|
responses:
|
794
|
-
|
902
|
+
201:
|
795
903
|
description: Posted a user metadata.
|
796
904
|
schema:
|
797
905
|
$ref: '#/definitions/MessageResponse'
|
798
906
|
400:
|
799
907
|
description: Metadata is invalid.
|
800
908
|
schema:
|
801
|
-
$ref: '#/definitions/
|
909
|
+
$ref: '#/definitions/DetailedErrorResponse'
|
802
910
|
429:
|
803
911
|
description: Too many requests.
|
804
912
|
schema:
|
@@ -851,11 +959,11 @@ paths:
|
|
851
959
|
- metadata
|
852
960
|
operationId: delete_item
|
853
961
|
summary: Delete an Item
|
854
|
-
description:
|
962
|
+
description: Deletes an item metadata with the given item id.
|
855
963
|
parameters:
|
856
964
|
- name: item_id
|
857
965
|
in: path
|
858
|
-
description: The
|
966
|
+
description: The item id to delete its metadata.
|
859
967
|
required: true
|
860
968
|
type: string
|
861
969
|
format: id
|
@@ -882,21 +990,21 @@ paths:
|
|
882
990
|
Posts an item metadata.
|
883
991
|
This metadata can be used to filter or to be included in recommendations and similars methods.
|
884
992
|
parameters:
|
885
|
-
- name:
|
993
|
+
- name: item
|
886
994
|
in: body
|
887
995
|
description: The metadata to be saved. Metadata format has its restrictions.
|
888
996
|
required: true
|
889
997
|
schema:
|
890
998
|
$ref: '#/definitions/Metadata'
|
891
999
|
responses:
|
892
|
-
|
1000
|
+
201:
|
893
1001
|
description: Posted an item metadata.
|
894
1002
|
schema:
|
895
1003
|
$ref: '#/definitions/MessageResponse'
|
896
1004
|
400:
|
897
1005
|
description: Metadata is invalid.
|
898
1006
|
schema:
|
899
|
-
$ref: '#/definitions/
|
1007
|
+
$ref: '#/definitions/DetailedErrorResponse'
|
900
1008
|
429:
|
901
1009
|
description: Too many requests.
|
902
1010
|
schema:
|
@@ -957,7 +1065,7 @@ paths:
|
|
957
1065
|
consumes:
|
958
1066
|
- text/plain; charset=utf-8
|
959
1067
|
parameters:
|
960
|
-
- name:
|
1068
|
+
- name: users
|
961
1069
|
in: body
|
962
1070
|
description: |
|
963
1071
|
A number of user metadata objects separated with newlines.
|
@@ -968,7 +1076,7 @@ paths:
|
|
968
1076
|
schema:
|
969
1077
|
type: string
|
970
1078
|
responses:
|
971
|
-
|
1079
|
+
201:
|
972
1080
|
description: Bulk user metadata request executed.
|
973
1081
|
schema:
|
974
1082
|
$ref: '#/definitions/MessageResponse'
|
@@ -976,6 +1084,10 @@ paths:
|
|
976
1084
|
description: Some metadata is not uploaded successfully.
|
977
1085
|
schema:
|
978
1086
|
$ref: '#/definitions/BulkSchemaErrorResponse'
|
1087
|
+
400:
|
1088
|
+
description: Body is missing.
|
1089
|
+
schema:
|
1090
|
+
$ref: '#/definitions/ErrorResponse'
|
979
1091
|
429:
|
980
1092
|
description: Too many requests.
|
981
1093
|
schema:
|
@@ -996,7 +1108,7 @@ paths:
|
|
996
1108
|
consumes:
|
997
1109
|
- text/plain; charset=utf-8
|
998
1110
|
parameters:
|
999
|
-
- name:
|
1111
|
+
- name: items
|
1000
1112
|
in: body
|
1001
1113
|
description: |
|
1002
1114
|
A number of item metadata objects separated with newlines.
|
@@ -1007,7 +1119,7 @@ paths:
|
|
1007
1119
|
schema:
|
1008
1120
|
type: string
|
1009
1121
|
responses:
|
1010
|
-
|
1122
|
+
201:
|
1011
1123
|
description: Bulk item metadata request executed.
|
1012
1124
|
schema:
|
1013
1125
|
$ref: '#/definitions/MessageResponse'
|
@@ -1015,6 +1127,10 @@ paths:
|
|
1015
1127
|
description: Some metadata is not uploaded successfully.
|
1016
1128
|
schema:
|
1017
1129
|
$ref: '#/definitions/BulkSchemaErrorResponse'
|
1130
|
+
400:
|
1131
|
+
description: Body is missing.
|
1132
|
+
schema:
|
1133
|
+
$ref: '#/definitions/ErrorResponse'
|
1018
1134
|
429:
|
1019
1135
|
description: Too many requests.
|
1020
1136
|
schema:
|
@@ -1030,18 +1146,17 @@ paths:
|
|
1030
1146
|
- recommendation
|
1031
1147
|
operationId: get_recommended_users
|
1032
1148
|
summary: Get Recommended Users
|
1033
|
-
description:
|
1149
|
+
description: Returns recommended users for the given query.
|
1034
1150
|
parameters:
|
1035
|
-
- name:
|
1151
|
+
- name: query
|
1036
1152
|
in: body
|
1037
|
-
description:
|
1038
|
-
Parameters for recommend users method.
|
1153
|
+
description: The query for recommended users.
|
1039
1154
|
required: true
|
1040
1155
|
schema:
|
1041
1156
|
$ref: '#/definitions/GetRecommendedUsersBody'
|
1042
1157
|
responses:
|
1043
1158
|
200:
|
1044
|
-
description:
|
1159
|
+
description: Recommended users response.
|
1045
1160
|
schema:
|
1046
1161
|
$ref: '#/definitions/UsersResponse'
|
1047
1162
|
400:
|
@@ -1066,18 +1181,17 @@ paths:
|
|
1066
1181
|
- recommendation
|
1067
1182
|
operationId: get_recommended_items
|
1068
1183
|
summary: Get Recommended Items
|
1069
|
-
description:
|
1184
|
+
description: Returns recommended items for the given query.
|
1070
1185
|
parameters:
|
1071
|
-
- name:
|
1186
|
+
- name: query
|
1072
1187
|
in: body
|
1073
|
-
description:
|
1074
|
-
Parameters for recommend items method.
|
1188
|
+
description: The query for recommended items.
|
1075
1189
|
required: true
|
1076
1190
|
schema:
|
1077
1191
|
$ref: '#/definitions/GetRecommendedItemsBody'
|
1078
1192
|
responses:
|
1079
1193
|
200:
|
1080
|
-
description:
|
1194
|
+
description: Recommended items response.
|
1081
1195
|
schema:
|
1082
1196
|
$ref: '#/definitions/ItemsResponse'
|
1083
1197
|
400:
|
@@ -1103,11 +1217,11 @@ paths:
|
|
1103
1217
|
- similarity
|
1104
1218
|
operationId: get_similar_users
|
1105
1219
|
summary: Get Similar Users
|
1106
|
-
description:
|
1220
|
+
description: Returns similar users for the query.
|
1107
1221
|
parameters:
|
1108
|
-
- name:
|
1222
|
+
- name: query
|
1109
1223
|
in: body
|
1110
|
-
description:
|
1224
|
+
description: The query for similar users.
|
1111
1225
|
required: true
|
1112
1226
|
schema:
|
1113
1227
|
$ref: '#/definitions/GetSimilarUsersBody'
|
@@ -1138,17 +1252,17 @@ paths:
|
|
1138
1252
|
- similarity
|
1139
1253
|
operationId: get_similar_items
|
1140
1254
|
summary: Get Similar Items
|
1141
|
-
description:
|
1255
|
+
description: Returns similar items for the query.
|
1142
1256
|
parameters:
|
1143
|
-
- name:
|
1257
|
+
- name: query
|
1144
1258
|
in: body
|
1145
|
-
description:
|
1259
|
+
description: The query for similar items.
|
1146
1260
|
required: true
|
1147
1261
|
schema:
|
1148
1262
|
$ref: '#/definitions/GetSimilarItemsBody'
|
1149
1263
|
responses:
|
1150
1264
|
200:
|
1151
|
-
description:
|
1265
|
+
description: Similar items response.
|
1152
1266
|
schema:
|
1153
1267
|
$ref: '#/definitions/ItemsResponse'
|
1154
1268
|
400:
|