-
Notifications
You must be signed in to change notification settings - Fork 1
/
senzing-poc-rest-api.yaml
9184 lines (9111 loc) · 382 KB
/
senzing-poc-rest-api.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.1
info:
title: Senzing POC REST API
version: "3.6.0"
description: >-
This is the Senzing POC REST API. This API is <b>NOT</b> maintained for
backwards compatibility. This API extends the
[Senzing REST API](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/senzing-garage/senzing-rest-api-specification/main/senzing-rest-api.yaml)
which is maintained for backwards compatibility. However, the Senzing
POC API is specifically targeted at the Senzing One-Day POC application and
no guarantees are made for support. It can be used as example for creating
your own extended API.
<br><br>
<b>SSE NOTE:</b> Some end-points described here will indicate "(Supports SSE)" to
indicate that they support "Server-sent Events" via the `text/event-stream`
media type. This support is activated by adding the
`Accept: text/event-stream` header to a request to override the
default `application/json` media type. Further, the end-point will behave
similarly to its standard operation but will produce `progress` events
at regular intervals that are equivalent to its `200` response schema.
Upon success, the final event will be `completed` with the same response
schema as a `200` response. Upon failure, the final event will be
`failed` with same schema as the `4xx` or `5xx` response (typically the
`SzErrorResponse`)
<br><br>
<b>WEB SOCKETS NOTE:</b> Some end-points described here will indicate "(Supports
WebSockets)" to indicate that they can invoked via the Web Sockets protocol.
This support is activated by invoking the end-point using the `ws://`
protocol in the URL. Any request query parameters can still be sent on the
URL and the request body can be sent as one or more message from the client
(as documented). The end-point response will be sent as one or more
response messages as documented (sometimes describing progress as with SSE
end-points). Upon failure responses will follow the same schema as the
`4xx` or `5xx` response (typically the `SzErrorResponse`)
servers:
- url: http://localhost:8250
- url: '{protocol}://{host}:{port}{path}'
variables:
protocol:
enum:
- http
- https
default: http
host:
default: localhost
port:
default: '8250'
path:
default: '/'
paths:
/:
get:
tags:
- Admin
summary: >-
Gets a root-level response from the server. This returns the same
as the `GET /heartbeat` endpoint for now, but may change in the future
to provide additional information.
description: |
The root operation can be used to ensure that the HTTP server is
indeed running, but this operation does not call upon the underlying
native Senzing API and therefore does not ensure the Senzing
initialization or configuration is valid.
operationId: root
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzBaseResponse'
application/json:
schema:
$ref: '#/components/schemas/SzBaseResponse'
default:
schema:
$ref: '#/components/schemas/SzBaseResponse'
/heartbeat:
get:
tags:
- Admin
summary: >-
Gets a heartbeat from the server to make sure it is up and
running. The response will include the current timestamp.
description: |
The heartbeat operation can be used to ensure that the HTTP server is
indeed running, but this operation does not call upon the underlying
native Senzing API and therefore does not ensure the Senzing
initialization or configuration is valid.
operationId: heartbeat
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzBaseResponse'
application/json:
schema:
$ref: '#/components/schemas/SzBaseResponse'
default:
schema:
$ref: '#/components/schemas/SzBaseResponse'
/specifications/open-api:
get:
tags:
- Admin
summary: >-
Gets this Open API specification to describe the API.
description: |
This operation can be used to obtain the Open API specification in JSON
format. The specification can either be the `data` field of a standard
response (i.e.: a response with a `meta`, `links` and `data` field) or
as raw format where the root JSON document is the Open API specification
JSON.
operationId: openApiSpecification
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzOpenApiSpecResponseOrRawJson'
application/json:
schema:
$ref: '#/components/schemas/SzOpenApiSpecResponseOrRawJson'
default:
schema:
$ref: '#/components/schemas/SzOpenApiSpecResponseOrRawJson'
/license:
get:
tags:
- Admin
summary: Get the license information.
description: |
This operation will obtain license information for the underlying
native Senzing API.
operationId: license
parameters:
- $ref: '#/components/parameters/withRawQueryParam'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzLicenseResponse'
application/json:
schema:
$ref: '#/components/schemas/SzLicenseResponse'
default:
schema:
$ref: '#/components/schemas/SzLicenseResponse'
/version:
get:
tags:
- Admin
summary: Get the full version information.
description: |
This operation will obtain the full version information for the server.
Much of the same information is available in the `meta` segment of
every JSON response.
operationId: version
parameters:
- $ref: '#/components/parameters/withRawQueryParam'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzVersionResponse'
application/json:
schema:
$ref: '#/components/schemas/SzVersionResponse'
default:
schema:
$ref: '#/components/schemas/SzVersionResponse'
/server-info:
get:
tags:
- Admin
summary: Get info regarding the server's state and supported features.
description: |
This operation will provides server information describing the options
with which the server was started. This can be used to determine if
the admin operations are enabled or if only read operations may be
invoked. This also allows the client to know the maximum message size
for Web Sockets communication.
operationId: getServerInfo
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzServerInfoResponse'
application/json:
schema:
$ref: '#/components/schemas/SzServerInfoResponse'
default:
schema:
$ref: '#/components/schemas/SzServerInfoResponse'
/attribute-types:
get:
tags:
- Config
summary: Get a list of configured attribute types.
description: |
This operation will provide a list of attribute types that are
configured. The client can filter the returned list of attribute types
using various query parameters.
operationId: getAttributeTypes
parameters:
- name: withInternal
description: >-
Set to `true` to include internal attribute types that are generally
not mapped by users. This defaults to false.
in: query
required: false
schema:
type: boolean
default: false
- name: attributeClass
description: >-
If specified, this filters the list of returned attribute types
to those of a specific attribute class. If not specified then no
filtering on attribute class is performed and all are returned.
in: query
required: false
schema:
$ref: '#/components/schemas/SzAttributeClass'
- name: featureType
description: >-
If specified, this filters the list of returned attribute types
to those belonging to a specific feature type. If not specified
then no filtering on feature type is performed and all are returned.
in: query
required: false
schema:
type: string
default: null
examples:
NAME:
value: NAME
ADDRESS:
value: ADDRESS
PHONE:
value: PHONE
DOB:
value: DOB
EMAIL:
value: EMAIL
EMPLOYER:
value: EMPLOYER
DRLIC:
value: DRLIC
SSN:
value: SSN
NATIONAL_ID:
value: NATIONAL_ID
PASSPORT:
value: PASSPORT
CITIZENSHIP:
value: CITIZENSHIP
NATIONALITY:
value: NATIONALITY
- $ref: '#/components/parameters/withRawQueryParam'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzAttributeTypesResponse'
application/json:
schema:
$ref: '#/components/schemas/SzAttributeTypesResponse'
default:
schema:
$ref: '#/components/schemas/SzAttributeTypesResponse'
'500':
$ref: '#/components/responses/ServerError'
/attribute-types/{attributeCode}:
get:
tags:
- Config
summary: Get the attribute type identified by the attribute code.
description: |
This operation will provide a description of a single attribute type for
the specified attribute type code.
operationId: getAttributeType
parameters:
- name: attributeCode
description: >-
The attribute code that uniquely identifies the attribute type.
in: path
required: true
schema:
type: string
examples:
NAME_ORG:
value: NAME_ORG
NAME_FULL:
value: NAME_FULL
NAME_LAST:
value: NAME_LAST
NAME_FIRST:
value: NAME_FIRST
NAME_MIDDLE:
value: NAME_MIDDLE
NAME_SUFFIX:
value: NAME_SUFFIX
ADDR_FULL:
value: ADDR_FULL
ADDR_LINE1:
value: ADDR_LINE1
ADDR_CITY:
value: ADDR_CITY
ADDR_STATE:
value: ADDR_STATE
ADDR_POSTAL_CODE:
value: ADDR_POSTAL_CODE
ADDR_COUNTRY:
value: ADDR_COUNTRY
PHONE_NUMBER:
value: PHONE_NUMBER
EMAIL_ADDRESS:
value: EMAIL_ADDRESS
DATE_OF_BIRTH:
value: DATE_OF_BIRTH
DRIVERS_LICENSE_NUMBER:
value: DRIVERS_LICENSE_NUMBER
SSN_NUMBER:
value: SSN_NUMBER
NATIONAL_ID_NUMBER:
value: NATIONAL_ID_NUMBER
PASSPORT_NUMBER:
value: PASSPORT_NUMBER
PASSPORT_COUNTRY:
value: PASSPORT_COUNTRY
- $ref: '#/components/parameters/withRawQueryParam'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzAttributeTypeResponse'
application/json:
schema:
$ref: '#/components/schemas/SzAttributeTypeResponse'
default:
schema:
$ref: '#/components/schemas/SzAttributeTypeResponse'
'404':
description: >-
If the specified attribute code is not recognized.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'500':
$ref: '#/components/responses/ServerError'
/data-sources:
get:
tags:
- Config
summary: Get a list of configured data sources.
description: |
This operation will provide a list of data source codes as well as a
list of detailed descriptions of each data source.
operationId: getDataSources
parameters:
- $ref: '#/components/parameters/withRawQueryParam'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzDataSourcesResponse'
application/json:
schema:
$ref: '#/components/schemas/SzDataSourcesResponse'
default:
schema:
$ref: '#/components/schemas/SzDataSourcesResponse'
'500':
$ref: '#/components/responses/ServerError'
post:
tags:
- Config
summary: >-
Adds one or more new data sources to the current default configuration
and reinitializes with the newly modified configuration.
description: |
Obtains the current default configuration, adds the specified data
sources and sets the modified configuration as the new default
configuration -- returning the set of all configured data sources.
**NOTE:** This operation may not be allowed. Some conditions that
might cause this operation to be forbidden are:
1. The server does not have administrative functions enabled.
2. The server is running in "read-only" mode.
3. The server is started with a file-based configuration specified
by `G2CONFIGFILE` property in the initialziation parameters.
4. The server is started with a specific configuration ID and
therefore cannot modify the configuration and change to a new
configuration.
operationId: addDataSources
parameters:
- name: dataSource
description: |
The multi-valued query parameter where each value is a data source
code identifying data sources to be created. If a data source code
is specified only via this parameter then the data source ID is
generated by the API server -- which is usually fine. If you want
to specify the data source ID, then use the request body instead.
in: query
required: false
style: form
explode: true
schema:
type: array
items:
type: string
examples:
singleDataSourceExample:
summary: Specify a single data source
value: [ PARTNERS ]
multipleDataSourcesExample:
summary: Specify multiple data sources
value: [ PARTNERS, VIPS ]
- $ref: '#/components/parameters/withRawQueryParam'
requestBody:
description: |
The optional request body to describe the data sources to be created.
This can be specified as an alternative to the `dataSource` parameter
or in addition to it. The content can be an array of string data
source codes or `SzDataSource` objects. It may also be a plain-text
unquoted string that is simply a single data source code.
See the various request body examples.
required: false
content:
application/json; charset=UTF-8:
schema:
oneOf:
- type: array
items:
$ref: '#/components/schemas/SzDataSourceDescriptor'
- $ref: '#/components/schemas/SzDataSourceDescriptor'
examples:
chooseExample:
$ref: '#/components/examples/chooseExample'
noDataSources:
$ref: '#/components/examples/noDataSources'
singleSourceString:
$ref: '#/components/examples/singleDataSourceString'
singleSourceStringArray:
$ref: '#/components/examples/singleDataSourceStringArray'
multipleSourcesStringArray:
$ref: '#/components/examples/multipleDataSourcesStringArray'
singleSourceObjectNoId:
$ref: '#/components/examples/singleDataSourceObjectNoId'
singleSourceObjectArrayNoId:
$ref: '#/components/examples/singleDataSourceObjectArrayNoId'
singleSourceObjectWithId:
$ref: '#/components/examples/singleDataSourceObjectWithId'
singleSourceObjectArrayWithId:
$ref: '#/components/examples/singleDataSourceObjectArrayWithId'
multipleSourcesObjectArrayWithId:
$ref: '#/components/examples/multipleDataSourcesObjectArrayWithId'
multipleSourcesMixed:
$ref: '#/components/examples/multipleDataSourcesMixed'
application/json:
schema:
oneOf:
- type: array
items:
$ref: '#/components/schemas/SzDataSourceDescriptor'
- $ref: '#/components/schemas/SzDataSourceDescriptor'
examples:
chooseExample:
$ref: '#/components/examples/chooseExample'
noDataSources:
$ref: '#/components/examples/noDataSources'
singleSourceString:
$ref: '#/components/examples/singleDataSourceString'
singleSourceStringArray:
$ref: '#/components/examples/singleDataSourceStringArray'
multipleSourcesStringArray:
$ref: '#/components/examples/multipleDataSourcesStringArray'
singleSourceObjectNoId:
$ref: '#/components/examples/singleDataSourceObjectNoId'
singleSourceObjectArrayNoId:
$ref: '#/components/examples/singleDataSourceObjectArrayNoId'
singleSourceObjectWithId:
$ref: '#/components/examples/singleDataSourceObjectWithId'
singleSourceObjectArrayWithId:
$ref: '#/components/examples/singleDataSourceObjectArrayWithId'
multipleSourcesObjectArrayWithId:
$ref: '#/components/examples/multipleDataSourcesObjectArrayWithId'
multipleSourcesMixed:
$ref: '#/components/examples/multipleDataSourcesMixed'
text/plain; charset=UTF=8:
schema:
type: string
examples:
chooseExample:
$ref: '#/components/examples/chooseExample'
noDataSources:
$ref: '#/components/examples/noDataSources'
singleSourceUnquotedString:
$ref: '#/components/examples/singleDataSourceUnquotedString'
text/plain:
schema:
type: string
examples:
chooseExample:
$ref: '#/components/examples/chooseExample'
noDataSources:
$ref: '#/components/examples/noDataSources'
singleSourceUnquotedString:
$ref: '#/components/examples/singleDataSourceUnquotedString'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzDataSourcesResponse'
application/json:
schema:
$ref: '#/components/schemas/SzDataSourcesResponse'
default:
schema:
$ref: '#/components/schemas/SzDataSourcesResponse'
'403':
description: >-
If the server was started in read-only mode and so the operation
is not permitted. This is also returned if the server was started
with a file-based configuration rather than a configuration stored
in the database (i.e.: `G2CONFIGFILE` is specified in an INI file)
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'500':
$ref: '#/components/responses/ServerError'
/data-sources/{dataSourceCode}:
get:
tags:
- Config
summary: Gets the details on the specified data source.
description: |
This operation provides details on a specific data source identified
by the data source code in the requested path.
operationId: getDataSource
parameters:
- $ref: '#/components/parameters/dataSourceCodePathParam'
- $ref: '#/components/parameters/withRawQueryParam'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzDataSourceResponse'
application/json:
schema:
$ref: '#/components/schemas/SzDataSourceResponse'
default:
schema:
$ref: '#/components/schemas/SzDataSourceResponse'
'500':
$ref: '#/components/responses/ServerError'
/configs/active:
get:
tags:
- Config
summary: >-
Gets the current active configuration as raw JSON, no interpretation.
description: |
This operation returns the JSON configuration that is currently being
used by the native Senzing API initialized by the running server. No
processing or interpretation is performed on the JSON. This may differ
from the registered "default configuration" which the server would
use if no other configuration were provided.
operationId: getActiveConfig
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzConfigResponse'
application/json:
schema:
$ref: '#/components/schemas/SzConfigResponse'
default:
schema:
$ref: '#/components/schemas/SzConfigResponse'
'500':
$ref: '#/components/responses/ServerError'
/configs/template:
get:
tags:
- Config
summary: >-
Gets the base template configuration as raw JSON, no interpretation.
This is the initial configuration for a new repository.
description: |
This operation returns a template base JSON configuration that can be
modified or customized by the caller. The returned template is
according to the underlying native Senzing API and may change between
version upgrades to Senzing. No processing or interpretation is
performed on the JSON. This will likely differ from the registered
"default configuration" or currently "active configuration" being used
by the running API server.
operationId: getTemplateConfig
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzConfigResponse'
application/json:
schema:
$ref: '#/components/schemas/SzConfigResponse'
default:
schema:
$ref: '#/components/schemas/SzConfigResponse'
'500':
$ref: '#/components/responses/ServerError'
/data-sources/{dataSourceCode}/records:
post:
tags:
- Entity Data
summary: >-
Load a new record specified in a data source with either an
auto-generated record ID or a `RECORD_ID` specified in the payload.
description: |
This operation loads a single record using the data source identified by
the data source code in the request path. The provided record in the
request body is described in JSON using the
[Senzing Generic Entity Specification](https://senzing.zendesk.com/hc/en-us/articles/231925448-Generic-Entity-Specification).
The provided record may contain a `RECORD_ID` to identify it uniquely
among other records in the same data source, but if it does not then a
record ID will be automatically generated. The record ID is returned
as part of the response.
**NOTE:** The `withInfo` parameter will return the entity resolution
info pertaining to the load. This can be used to update a search index
or external data mart. Additionally, Senzing API Server provides a
means to have the "raw" entity resolution info (from the underlying
native Senzing API) automatically sent to a messaging service such as
those provided by Amazon SQS, Rabbit MQ or Kafka regardless of the
`withInfo` query parameter value.
operationId: addRecordWithReturnedRecordId
parameters:
- $ref: '#/components/parameters/dataSourceCodePathParam'
- $ref: '#/components/parameters/loadIdQueryParam'
- $ref: '#/components/parameters/withInfoQueryParam'
- $ref: '#/components/parameters/withRawQueryParam'
requestBody:
description: >-
The record data as JSON. The format of the JSON is described
by the [Senzing Generic Entity Specification](https://senzing.zendesk.com/hc/en-us/articles/231925448-Generic-Entity-Specification).
The specified JSON may include or exclude the DATA_SOURCE field.
It will be added if excluded. If included, it must match the
data source code in the path parameters.
required: true
content:
application/json; charset=UTF-8:
schema:
type: object
additionalProperties: {}
examples:
simpleFlatRecordExample:
$ref: '#/components/examples/simpleFlatRecordExample'
complexFlatRecordExample:
$ref: '#/components/examples/complexFlatRecordExample'
simpleHierarchicalRecordExample:
$ref: '#/components/examples/simpleHierarchicalRecordExample'
complexHierarchicalRecordExample:
$ref: '#/components/examples/complexHierarchicalRecordExample'
application/json:
schema:
type: object
additionalProperties: {}
examples:
simpleFlatRecordExample:
$ref: '#/components/examples/simpleFlatRecordExample'
complexFlatRecordExample:
$ref: '#/components/examples/complexFlatRecordExample'
simpleHierarchicalRecordExample:
$ref: '#/components/examples/simpleHierarchicalRecordExample'
complexHierarchicalRecordExample:
$ref: '#/components/examples/complexHierarchicalRecordExample'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzLoadRecordResponse'
application/json:
schema:
$ref: '#/components/schemas/SzLoadRecordResponse'
default:
schema:
$ref: '#/components/schemas/SzLoadRecordResponse'
'400':
description: >-
If the specified data contains a DATA_SOURCE field that is not
consistent with the dataSourceCode in the path of the request
or if the specified content body is not formatted as JSON.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'403':
description: >-
If the server was started in read-only mode and so the operation
is not permitted.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'404':
description: >-
If the specified data source code in the path is not recognized.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'500':
$ref: '#/components/responses/ServerError'
/data-sources/{dataSourceCode}/records/{recordId}:
get:
tags:
- Entity Data
summary: Get an entity record by data source and record ID.
description: |
Gets details on a specific entity record identified by the data source
code and record ID specified in the request path.
operationId: getRecord
parameters:
- $ref: '#/components/parameters/dataSourceCodePathParam'
- $ref: '#/components/parameters/recordIdPathParam'
- $ref: '#/components/parameters/withRawQueryParam'
responses:
'200':
description: Successul response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzRecordResponse'
application/json:
schema:
$ref: '#/components/schemas/SzRecordResponse'
default:
schema:
$ref: '#/components/schemas/SzRecordResponse'
'404':
description: If data source or record ID are not found.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'500':
$ref: '#/components/responses/ServerError'
put:
tags:
- Entity Data
summary: >-
Load a new record or replace a record in a data source with a
specific record ID.
description: |
This operation loads a single record using the data source identified by
the data source code in the request path. The record will be identified
uniquely within the data source by the record ID provided in the request
path. The provided record in the request body is described in JSON
using the [Senzing Generic Entity Specification](https://senzing.zendesk.com/hc/en-us/articles/231925448-Generic-Entity-Specification).
The provided JSON record may omit the `RECORD_ID`, but if it contains a
`RECORD_ID` then it **must** match the record ID provided on the request
path. The record ID is returned as part of the response.
**NOTE:** The `withInfo` parameter will return the entity resolution
info pertaining to the load. This can be used to update a search index
or external data mart. Additionally, Senzing API Server provides a
means to have the "raw" entity resolution info (from the underlying
native Senzing API) automatically sent to a messaging service such as
those provided by Amazon SQS, Rabbit MQ or Kafka regardless of the
`withInfo` query parameter value.
operationId: addRecord
parameters:
- $ref: '#/components/parameters/dataSourceCodePathParam'
- $ref: '#/components/parameters/recordIdPathParam'
- $ref: '#/components/parameters/loadIdQueryParam'
- $ref: '#/components/parameters/withInfoQueryParam'
- $ref: '#/components/parameters/withRawQueryParam'
requestBody:
description: >-
The record data as JSON. The format of the JSON is described
by the [Senzing Generic Entity Specification](https://senzing.zendesk.com/hc/en-us/articles/231925448-Generic-Entity-Specification).
The specified JSON may include or exclude the DATA_SOURCE and
RECORD_ID fields. Any excluded field will be added to the JSON
accordingly. Any included field in the JSON, must match the
respective path parameter for data source code or record ID.
required: true
content:
application/json; charset=UTF-8:
schema:
type: object
additionalProperties: {}
examples:
simpleFlatRecordExample:
$ref: '#/components/examples/simpleFlatRecordExample'
complexFlatRecordExample:
$ref: '#/components/examples/complexFlatRecordExample'
simpleHierarchicalRecordExample:
$ref: '#/components/examples/simpleHierarchicalRecordExample'
complexHierarchicalRecordExample:
$ref: '#/components/examples/complexHierarchicalRecordExample'
application/json:
schema:
type: object
additionalProperties: {}
examples:
simpleFlatRecordExample:
$ref: '#/components/examples/simpleFlatRecordExample'
complexFlatRecordExample:
$ref: '#/components/examples/complexFlatRecordExample'
simpleHierarchicalRecordExample:
$ref: '#/components/examples/simpleHierarchicalRecordExample'
complexHierarchicalRecordExample:
$ref: '#/components/examples/complexHierarchicalRecordExample'
responses:
'200':
description: Successful response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzLoadRecordResponse'
application/json:
schema:
$ref: '#/components/schemas/SzLoadRecordResponse'
default:
schema:
$ref: '#/components/schemas/SzLoadRecordResponse'
'400':
description: >-
If the specified data contains a DATA_SOURCE field that is not
consistent with the dataSourceCode in the path of the request
or if the specified content body is not formatted as JSON.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'403':
description: >-
If the server was started in read-only mode and so the operation
is not permitted.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'404':
description: >-
If the specified data source code in the path is not recognized.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'500':
$ref: '#/components/responses/ServerError'
delete:
tags:
- Entity Data
summary: Delete a record given its data source and record ID.
description: |
This operation deletes a single record identified by the data source
code and record ID in the request path.
**NOTE:** The `withInfo` parameter will return the entity resolution
info pertaining to the delete. This can be used to update a search
index or external data mart. Additionally, Senzing API Server provides
a means to have the "raw" entity resolution info (from the underlying
native Senzing API) automatically sent to a messaging service such as
those provided by Amazon SQS, Rabbit MQ or Kafka regardless of the
`withInfo` query parameter value.
operationId: deleteRecord
parameters:
- $ref: '#/components/parameters/dataSourceCodePathParam'
- $ref: '#/components/parameters/recordIdPathParam'
- $ref: '#/components/parameters/loadIdQueryParam'
- $ref: '#/components/parameters/withInfoQueryParam'
- $ref: '#/components/parameters/withRawQueryParam'
responses:
'200':
description: default response
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzDeleteRecordResponse'
application/json:
schema:
$ref: '#/components/schemas/SzDeleteRecordResponse'
default:
schema:
$ref: '#/components/schemas/SzDeleteRecordResponse'
'404':
description: If data source is not found.
content:
application/json; charset=UTF-8:
schema:
$ref: '#/components/schemas/SzErrorResponse'
application/json:
schema:
$ref: '#/components/schemas/SzErrorResponse'
default:
schema:
$ref: '#/components/schemas/SzErrorResponse'
'500':
$ref: '#/components/responses/ServerError'
/data-sources/{dataSourceCode}/records/{recordId}/reevaluate:
post:
tags:
- Entity Data
summary: Reevaluate a record identified by a data source and record ID.
description: |
This operation reevaluates a single record identified by the data source
code and record ID in the request path.
**NOTE:** The `withInfo` parameter will return the entity resolution
info pertaining to the reevaluation. This can be used to update a
search index or external data mart. Additionally, Senzing API Server
provides a means to have the "raw" entity resolution info (from the
underlying native Senzing API) automatically sent to a messaging service
such as those provided by Amazon SQS, Rabbit MQ or Kafka regardless of
the `withInfo` query parameter value.