-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
2031 lines (1940 loc) · 62 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: Keatext Partner API
description: >-
Keatext brings the voice of customer and employee into your day-to-day
activities. Easily understand what drives engagement and get tailored
AI-based recommendations to improve people experiences.
version: 2.0.0
servers:
- url: https://icarusapi.keatext.ai/api
tags:
- name: datasets
x-displayName: Datasets
- description: >-
Whenever calling an analytics endpoint that returns a collection of items
or analytics results that apply to a set of records, you can use filters
in your query to scope on which records the calculations should be
applied.
See [Filters](https://developer.keatext.ai) for an exhaustive list of
available filters
and how to apply them.
name: analytics
x-displayName: Analytics
- name: organizations
x-displayName: Organizations
- description: >-
Filters of different types are interpreted using a logical `AND`,
while filters of the same type are interpreted using `OR`.
For example, the following configuration would only return analytics for a
record if:
- it has a rating greater than 3
- it was written since last Monday
- it contains either “this” or “that”, or both of them.
```
{
"filters": [
{
"type": "greaterThan",
"datasetId": "5a6658f1abb99b1a00f39451",
"fieldId": "6038c4e0-4f0e-49c2-a80e-869a541bc890",
"value": 3
},
{
"type": "dateFriendly",
"value": "thisWeek"
},
{
"type": "contains",
"datasetId": "5a6658f1abb99b1a00f39451",
"fieldId": "6038c4e0-4f0e-49c2-a80e-869a541bc890",
"value": "this"
},
{
"type": "contains",
"datasetId": "5a6658f1abb99b1a00f39451",
"fieldId": "6038c4e0-4f0e-49c2-a80e-869a541bc890",
"value": "that"
}
]
}
```
__Note__: We no longer accept the `field` property inside filter objects.
name: filters
x-displayName: Filters
- name: authentication
x-displayName: Authentication
- description: >-
A typical workflow for a partner consists of:
* [Creating an organization for a client
company](/#operation/create-organization)
* [Creating a dataset for that organization](/#operation/create-dataset)
* [Adding records to that dataset](/#operation/add-records)
* [Giving a user access to the application](/#operation/authenticate-user)
name: basic-workflow
x-displayName: Basic workflow
paths:
/analytics/statements:
post:
tags:
- analytics
summary: Get Statement Groups
operationId: Analytics_getStatementGroups
description: >-
A **statement group** is a group of statements that share the same topic
group, indicator group, and category (praise, problem, etc.).
For example, these negative statements belong to the same group:
- The <b>bathroom</b> was <i>filthy</i>.
- The <b>washroom</b> was <i>disgusting</i>.
- The <b>restroom</b> was <i>unsanitary</i>.
if the topics (in bold) and indicators (in italics) are in the same
topic
and indicator groups, respectively.
This endpoint returns a representative statement for each statement
groups. The
representative statement's expression is what we display in the Keatext
user
interface.
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Offset'
- $ref: '#/components/parameters/QueryOrganizationId'
requestBody:
$ref: '#/components/requestBodies/AnalyticsRequest'
responses:
'200':
description: List of statement groups successfully retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/AnalyticsGetStatementGroupsResponse'
/analytics/documents:
get:
tags:
- analytics
summary: Get Documents
operationId: Analytics_getFlexibly
description: >-
This endpoint allows you to retrieve documents flexibly. In addition to
sending
filters, you can optionally provide, through query parameters, a partial
or
complete description of a statement group with a topic group id,
indicator group
id, and category.
This allows you, for example, to get documents that contain statement
groups with
the topic group "bathroom" and the category "praise".
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Offset'
- $ref: '#/components/parameters/QueryOrganizationId'
- $ref: '#/components/parameters/AuthorizationHeader'
- $ref: '#/components/parameters/TopicGroupId'
- $ref: '#/components/parameters/IndicatorGroupId'
- $ref: '#/components/parameters/Category'
requestBody:
$ref: '#/components/requestBodies/AnalyticsRequest'
responses:
'200':
description: List of documents successfully retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/AnalyticsGetFlexiblyResponse'
/analytics/documents/{documentId}:
get:
tags:
- analytics
summary: Get a Document
operationId: Analytics_getDocumentById
parameters:
- $ref: '#/components/parameters/QueryOrganizationId'
- $ref: '#/components/parameters/AuthorizationHeader'
responses:
'200':
description: Document successfully retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/DocumentResponse'
/analytics/topics:
get:
tags:
- analytics
summary: Get Topic Groups
operationId: Analytics_getTopicGroups
description: |-
A **topic** is the "subject" of a statement. For instance, when we say:
- The <b>bathroom</b> was dirty but the <b>view</b> was nice.
there are two topics, identified in bold.
Topics that are synonymous or nearly synonymous (for example,
_bathroom_ and _washroom_) are typically grouped automatically.
Each topic group has a "representative" and contains one or more topics.
Please note that for consistency, __topics with no synonyms are still
returned as groups with only one member__.
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Offset'
- $ref: '#/components/parameters/QueryOrganizationId'
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
$ref: '#/components/requestBodies/AnalyticsRequest'
responses:
'200':
description: List of topics successfully retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/AnalyticsGetTopicGroupsResponse'
/analytics/indicators:
get:
tags:
- analytics
summary: Get Indicator Groups
operationId: Analytics_getIndicatorGroups
description: |-
An **indicator** is an expression that describes a topic. For
instance, when we say:
- The food was <i>great</i> and <i>inexpensive</i>.
there are two indicators, identified in italics.
Indicators that are synonymous or nearly synonymous (for example,
_clean_ and _tidy_) are typically grouped automatically.
Each indicator group has a "representative" and contains one or more
indicators.
Please note that for consistency, __indicators with no synonyms are
returned as groups with only one member__.
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Offset'
- $ref: '#/components/parameters/QueryOrganizationId'
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
$ref: '#/components/requestBodies/AnalyticsRequest'
responses:
'200':
description: List of indicators successfully retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/AnalyticsGetIndicatorGroupsResponse'
/auth/login:
post:
tags:
- authentication
summary: Generate a Token
operationId: Authentication_generateToken
description: |-
This endpoint allows you to generate a token that will authenticate
you in further calls to our API. This token is typically valid for 7
days, and generating a new token doesn't invalidate previous,
unexpired tokens.
If you use curl, we recommend putting your credentials in a JSON file
(see the request sample in the right pane) and reading from that file
to simplify the process of generating new tokens.
```bash
curl -H "Content-Type: application/json" \
-d @credentials.json \
-X POST \
https://icarusapi.keatext.ai/api/auth/login
```
You could even go one step further by storing the resulting token in
a text file and reading from that file as well:
```bash
curl [...] | jq -r '.jwt.token' > token.txt
# In further calls to our API
curl -H "Authorization: Bearer $(cat token.txt)" [...]
```
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationGenerateTokenRequest'
required: true
responses:
'200':
description: Token successfully generated
content:
application/json:
schema:
$ref: '#/components/schemas/Token'
'400':
description: User doesn't exist, or password is missing or empty
/datasets/{datasetId}:
get:
tags:
- datasets
summary: Get a Dataset
operationId: Datasets_getData
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
responses:
'200':
description: Dataset successfully retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
'404':
description: Dataset doesn't exist
patch:
tags:
- datasets
summary: Update a Dataset's Properties
operationId: Datasets_updateProperties
description: |-
This endpoint allows you to change a dataset's name and description,
and what field is used as a primary date, customer id, and primary
key. To change a dataset's fields, use the
[Create a Dataset Field](/#operation/create-field),
[Update a Dataset Field](/#operation/update-field), and
[Delete a Dataset Field](/#operation/delete-field) endpoints.
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MutateDataset'
required: true
responses:
'204':
description: Dataset successfully updated
delete:
tags:
- datasets
summary: Delete a Dataset
operationId: Datasets_deleteDataset
description: >-
This endpoint allows you to delete a dataset. <u><b>Warning</b>: All
data and
analytics for that dataset will be deleted. Use with caution.</u>
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
responses:
'204':
description: Dataset successfully deleted
/datasets:
get:
tags:
- datasets
summary: Get an Organization's Datasets
operationId: Datasets_getOrganizationData
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
- description: The organization's id.
name: orgId
in: query
required: true
example: 592dc9a6afbf6d1b0095f097
schema:
type: string
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Offset'
responses:
'200':
description: Datasets successfully retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetsGetOrganizationDataResponse'
post:
tags:
- datasets
summary: Create a Dataset
operationId: Datasets_addRecords
description: |-
A dataset is a collection of records that share the same structure. You
can add as many records to a dataset as you want, as well as change the
dataset's structure over time as your needs change.
(To change a dataset's fields, use the
[Create a Dataset Field](/#operation/create-field),
[Update a Dataset Field](/#operation/update-field), and
[Delete a Dataset Field](/#operation/delete-field) endpoints.)
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
required: true
responses:
'200':
description: Dataset successfully created
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
/datasets/{datasetId}/fields:
post:
tags:
- datasets
summary: Create a Dataset Field
operationId: Datasets_addFieldToDataset
description: |-
This endpoint allows you to add a field to an existing dataset, as
the structure of your data changes over time.
The new field can be used in filters through the API, and in the
app if the field is set to visible (see the `isVisible` property).
Records ingested before adding the field have a null value for it,
but can be updated with our endpoint to
[Update a Dataset](/#operation/update-records).
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetV3Field'
required: true
responses:
'201':
description: Field successfully created
/datasets/{datasetId}/fields/{fieldKey}:
patch:
tags:
- datasets
summary: Update a Dataset Field
operationId: Datasets_updateFieldVisibility
description: This endpoint allows you to rename a field or change its visibility.
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
- description: The field's unique identifier.
name: fieldKey
in: path
required: true
example: customer_response_1
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MutateField/Request'
required: true
responses:
'204':
description: Field successfully updated
delete:
tags:
- datasets
summary: Delete a Dataset Field
operationId: Datasets_removeField
description: >-
This endpoint allows you to delete a field. <u><b>Warning</b>: All data
and
analytics for that field will be deleted. Use with caution.</u>
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
- description: The field's unique identifier.
name: fieldKey
in: path
required: true
example: customer_response_1
schema:
type: string
responses:
'204':
description: Field successfully deleted
/datasets/{datasetId}/records:
post:
tags:
- datasets
summary: Populate a Dataset
operationId: Datasets_ingestRecords
description: |-
Assuming you've followed the instructions to
[generate a token](/#operation/get-token) and to
[create a dataset](/#operation/create-dataset),
then you can ingest records by putting them in a JSON file and then
making a call to our API:
```bash
curl -H "Authorization: Bearer $(cat token.txt)" \
-H "Content-Type: application/json" \
-d @records.json \
-X POST \
https://icarusapi.keatext.ai/api/datasets/XdzFGgUhXsf7/records
```
Note that you need to replace the dataset id in the URL with yours.
The response simply contains information about the ingestion, such
as the number of records that failed to be processed, that are
enqueued, or that were already processed.
parameters:
- $ref: '#/components/parameters/DatasetId'
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/IngestionRequest'
required: true
responses:
'200':
description: Dataset successfully populated
content:
application/json:
schema:
$ref: '#/components/schemas/IngestionResponse'
/organizations:
post:
tags:
- organizations
summary: Create an Organization
operationId: Organizations_createOrganization
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Organization'
required: true
responses:
'200':
description: Organization successfully created
content:
application/json:
schema:
$ref: '#/components/schemas/Organization'
get:
tags:
- organizations
summary: Get Your Organizations
operationId: Organizations_listYour
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
responses:
'200':
description: Organizations successfully retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationsListYourResponse'
/organizations/{organizationId}:
delete:
tags:
- organizations
summary: Delete an Organization
operationId: Organizations_deleteOrganizationPermanently
description: |-
This endpoint deletes an organization permanently. __This
action cannot be undone__.
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
- $ref: '#/components/parameters/OrganizationId'
responses:
'204':
description: Organization successfully deleted
/organizations/{organizationId}/access-url:
post:
tags:
- organizations
summary: Create and Authenticate a User
operationId: Organizations_createAndAuthenticateUser
description: >-
This endpoint creates and authenticates a user. __You have control over
which datasets they can see__.
The path returned is relative and must be prefixed with a hostname. If
you use a custom domain with
a CNAME record pointing to the Keatext servers, the full path can be
reconstructed as:
```
Domain name
---------------
https://partnername.com/passwordless-login?token=akdAKDYHlkh18384jh1mkj&version=2
-----
-----------------------------------------------------
Protocol must The value of the path property
be HTTPS
```
The URL is __only valid for 30 seconds__. Once they are logged in, their
session will stay active for up
to 7 days, after which you will have to re-authenticate them.
__Note__: The `permanentFilters` and `temporaryFilters` parameters are
no longer supported.
parameters:
- $ref: '#/components/parameters/OrganizationId'
- $ref: '#/components/parameters/AuthorizationHeader'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SSORequest'
responses:
'200':
description: User successfully created
content:
application/json:
schema:
$ref: >-
#/components/schemas/OrganizationsCreateAndAuthenticateUserResponse
/organizations/{organizationId}/users:
delete:
tags:
- organizations
summary: Remove a User
operationId: Organizations_revokeAccess
description: This endpoint revokes a user's access to the organization.
parameters:
- $ref: '#/components/parameters/AuthorizationHeader'
- $ref: '#/components/parameters/OrganizationId'
- description: The user's encoded email address.
name: email
in: query
example: tom%40example.com
schema:
type: string
format: email
responses:
'204':
description: User successfully removed
/:
options:
tags:
- filters
summary: Available filters
operationId: Filters_listAvailableFilters
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FiltersListAvailableFiltersRequest'
responses:
default:
description: Default response
components:
parameters:
AuthorizationHeader:
description: The [authorization token](/#operation/get-token).
name: Authorization
in: header
required: true
example: Bearer ZW1haWxAZXhhbXBsZS5jb206cGFzc3dvcmQ=
schema:
type: string
DatasetId:
description: The dataset's id.
example: XdzFGgUhXsf7
ContentTypeJson:
name: Content-Type
in: header
schema:
type: string
enum:
- application/json
AcceptJson:
name: Accept
in: header
schema:
type: string
enum:
- application/json
OrganizationId:
description: The organization's id.
name: organizationId
in: path
required: true
example: qU7zwuA6JQNw7fy8zut4VW5C
schema:
type: string
Path:
OrganizationId:
name: organizationId
in: path
required: true
type: string
example: 5a6658f1abb99b1a00f39451
DatasetId:
name: datasetId
in: path
required: true
example: 5a6658f1abb99b1a0024af10
schema:
type: string
DocumentId:
description: The record's id.
name: documentId
in: path
required: true
example: 4d8ee970
schema:
type: string
Limit:
description: The number of items to include in the result set.
name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 50
default: 15
Offset:
description: The starting position of the result set.
name: offset
in: query
required: false
schema:
type: integer
default: 0
QueryOrganizationId:
description: The id of the organization to get analytics from.
name: orgId
in: query
required: true
example: qU7zwuA6JQNw7fy8zut4VW5C
schema:
type: string
Sort:
description: |-
The datasets' property to use for sorting the list. The default order is
ascending. The mathematical negation symbol (`-`) can be prepended to
retrieve results in descending order.
name: sort
in: query
required: false
schema:
type: string
TopicGroupId:
description: An optional topic group id.
name: topicGroupId
in: query
required: false
example: 245efb1d-971c-4d4b-919e-4e0296782982
schema:
type: string
format: uuid
IndicatorGroupId:
description: An optional indicator group id.
name: indicatorGroupId
in: query
required: false
example: a2571140-28d9-4b15-a1c1-768eefbfb64c
schema:
type: string
format: uuid
Category:
description: An optional category.
name: category
in: query
required: false
schema:
type: string
enum:
- praise
- problem
- suggestion
- question
requestBodies:
AnalyticsRequest:
content:
application/json:
schema:
$ref: '#/components/schemas/AnalyticsRequest'
required: true
schemas:
Username:
description: The user's email address.
type: string
format: email
example: tom@example.com
Password:
description: The user's password.
type: string
format: password
example: mypassword
Token:
type: object
properties:
jwt:
description: A JSON web token object.
type: object
properties:
token:
description: >-
A token to include in every request (Authorization: Bearer
MY_TOKEN).
type: string
example: hFCSR1sPJPFW6zH.0ygrZcFrWNnJX04.CkBXBFVevJx2baZ
expiresIn:
description: The number of seconds before the token expires.
type: integer
example: 604800
DatasetId:
description: |-
The id to use as a path parameter when calling an endpoint to retrieve
or modify the dataset.
type: string
example: 5c4a39716b2acd460052ac60
IngestionRequest:
type: object
required:
- records
properties:
records:
description: >-
The records to ingest.
**You need to use field keys (for example, `review_content`) rather
than field names
(`Review Content`) when ingesting records.**
If you did not set field keys explicitly (through a deprecated
endpoint), you can get
them with our endpoint to [Get a Dataset](/#operation/get-dataset).
type: array
items:
type: object
example:
records:
- author_id: 23199287
review_id: 456133
review_date: '2012-06-10T00:00:00.000Z'
review_content: >-
The clerk was extremely rude and the prices were too high. I won't
be back.
borough: Brooklyn
- author_id: 18630125
review_id: 737718
review_date: '2013-11-23T00:00:00.000Z'
review_content: >-
The store can get a bit too crowded but the clothes are really
nice.
borough: Manhattan
- author_id: 17943312
review_id: 737971
review_date: '2013-12-27T00:00:00.000Z'
review_content: >-
Good prices but the floor was dirty and the changing rooms were
too small.
borough: Manhattan
IngestionResponse:
type: object
properties:
failed:
description: The records that failed validation, along with the reason(s) why.
type: array
items:
type: object
properties:
rejectionReasons:
description: An array of validation errors.
type: array
items:
type: string
example:
- Reviewer Id: 23199287
Review Id: 456133
Date: '2012-06-10T00:00:00.000Z'
Review: >-
The clerk was extremely rude and the prices were too high. I
won't be back.
Borough: Brooklyn
rejectionReasons:
- Invalid date in 'Date'
enqueued:
description: The number of records currently enqueued for processing.
type: number
example: 17
processed:
description: The number of records already processed.
type: number
example: 1003
FilterDatasetId:
description: The dataset's id.
type: string
format: ObjectId
example: 5a6658f1abb99b1a00f39451
FieldId:
description: The field's id.
type: string
format: uuid
example: 086e1530-4364-4a1d-b7b2-97e929d188ea
Filter:
type: object
required:
- type
discriminator:
propertyName: type
properties:
type:
description: The filter's type.
type: string
example: isKnown
isKnown:
description: The field's value is not empty.
required:
- field
allOf:
- $ref: '#/components/schemas/Filter'
- properties:
type:
description: The filter's type.
type: string
example: isKnown
datasetId:
$ref: '#/components/schemas/FilterDatasetId'
fieldId:
$ref: '#/components/schemas/FieldId'
isUnknown:
description: The field value is missing or empty.
required:
- field
allOf:
- $ref: '#/components/schemas/Filter'
- properties:
type:
description: The filter's type.
type: string
example: isUnknown
datasetId:
$ref: '#/components/schemas/FilterDatasetId'
fieldId:
$ref: '#/components/schemas/FieldId'
NumberFilter:
type: object
required:
- field
- value
properties:
datasetId:
$ref: '#/components/schemas/FilterDatasetId'
fieldId:
$ref: '#/components/schemas/FieldId'
value:
type: number
example: 49
greaterThan:
description: The field value is greater than a number.
allOf:
- $ref: '#/components/schemas/Filter'
- $ref: '#/components/schemas/NumberFilter'
- properties:
type:
description: The filter's type.
type: string
example: greaterThan
smallerThan:
description: The field value is smaller than a number.
allOf:
- $ref: '#/components/schemas/Filter'
- $ref: '#/components/schemas/NumberFilter'
- properties:
type:
description: The filter's type.
type: string
example: smallerThan
equal:
description: The field value is equal to a number.