-
Notifications
You must be signed in to change notification settings - Fork 21
/
openapi.yaml
2804 lines (2804 loc) · 99.8 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.1
info:
contact:
email: edeutsch@systemsbiology.org
description: TRAPI 1.2 endpoint for the NCATS Biomedical Translator Reasoner called
ARAX
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: https://github.com/RTXteam/RTX/blob/master/LICENSE
title: ARAX Translator Reasoner
version: 1.2.8
x-translator:
component: ARA
team:
- Expander Agent
infores: infores:arax
biolink-version: 2.2.11
externalDocs:
description: The values for component and team are restricted according to this
external JSON schema. See schema and examples at url
url: https://github.com/NCATSTranslator/translator_extensions/blob/production/x-translator/
x-trapi:
version: 1.2.1
asyncquery: true
operations:
- lookup
- lookup_and_score
- overlay_compute_ngd
- overlay_compute_jaccard
- overlay_fisher_exact_test
- overlay_connect_knodes
- filter_results_top_n
- bind
- fill
- filter_kgraph_orphans
- filter_kgraph_top_n
- filter_kgraph_std_dev
- filter_kgraph_percentile
- filter_kgraph_discrete_kedge_attribute
- filter_kgraph_continuous_kedge_attribute
- sort_results_score
- sort_results_edge_attribute
- sort_results_node_attribute
- annotate_nodes
- score
- complete_results
externalDocs:
description: The values for version are restricted according to the regex in
this external JSON schema. See schema and examples at url
url: https://github.com/NCATSTranslator/translator_extensions/blob/production/x-trapi/
externalDocs:
description: Documentation for the NCATS Biomedical Translator Reasoners web services
url: https://github.com/NCATSTranslator/ReasonerAPI
servers:
- description: ARAX TRAPI 1.2 endpoint - production
url: https://arax.transltr.io/api/arax/v1.2
x-maturity: production
- description: ARAX TRAPI 1.2 endpoint - production
url: https://arax.ncats.io/api/arax/v1.2
x-maturity: production
- description: ARAX TRAPI 1.2 endpoint - testing
url: https://arax.test.transltr.io/api/arax/v1.2
x-maturity: testing
- description: ARAX TRAPI 1.2 endpoint - staging
url: https://arax.ci.transltr.io/api/arax/v1.2
x-maturity: staging
- description: ARAX TRAPI 1.2 endpoint - development
url: https://arax.ncats.io/beta/api/arax/v1.2
x-maturity: development
- description: ARAX TRAPI 1.2 endpoint - development
url: https://arax.ncats.io/test/api/arax/v1.2
x-maturity: development
- description: ARAX TRAPI 1.2 endpoint - development
url: https://arax.ncats.io/devED/api/arax/v1.2
x-maturity: development
- description: ARAX TRAPI 1.2 endpoint - development
url: https://arax.ncats.io/devLM/api/arax/v1.2
x-maturity: development
tags:
- description: Get supported relationships
externalDocs:
description: Documentation for the reasoner predicates function
url: https://arax.ncats.io/overview.html#predicates
name: meta_knowledge_graph
- description: Initiate a query and wait to receive the response
externalDocs:
description: Documentation for the reasoner query function
url: https://arax.ncats.io/overview.html#query
name: query
- description: Initiate a query with a callback to receive the response
externalDocs:
description: Documentation for the reasoner asynchquery function
url: https://arax.ncats.io/overview.html#asyncquery
name: asyncquery
- description: Required for SmartAPI validation of x-translator
name: translator
- description: Required for SmartAPI validation of x-trapi
name: trapi
- description: Request a previously stored response from the server
externalDocs:
description: Documentation for the reasoner response function
url: https://arax.ncats.io/overview.html#response
name: response
- description: Translate natural language question into a standardized query
externalDocs:
description: Documentation for the reasoner translate function
url: https://arax.ncats.io/overview.html#translate
name: translate
- description: Return identifier and type of some entity in the knowledge graph
externalDocs:
description: Documentation for the reasoner entity function
url: https://arax.ncats.io/overview.html#entity
name: entity
- description: Return a list of example questions that the reasoner can answer
externalDocs:
description: Documentation for the reasoner exampleQuestions function
url: https://arax.ncats.io/overview.html#exampleQuestions
name: exampleQuestions
- description: Query to get the Normalized Google Distance between two MeSH terms
based on co-occurance in all PubMed article annotations
externalDocs:
description: Documentation for the reasoner PubmedMeshNgd function
url: https://arax.ncats.io/overview.html#PubmedMeshNgd
name: PubmedMeshNgd
- description: Return status information about the endpoint
name: status
paths:
/PubmedMeshNgd/{term1}/{term2}:
get:
operationId: pubmed_mesh_ngd
parameters:
- description: First of two terms. Order not important.
example: PTGS2
explode: false
in: path
name: term1
required: true
schema:
type: string
style: simple
- description: Second of two terms. Order not important.
example: acetaminophen
explode: false
in: path
name: term2
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/MeshNgdResponse'
description: successful operation
"400":
description: Invalid terms
summary: Query to get the Normalized Google Distance between two MeSH terms
based on co-occurrence in all PubMed article annotations
tags:
- PubmedMeshNgd
x-openapi-router-controller: openapi_server.controllers.pubmed_mesh_ngd_controller
/asyncquery:
post:
operationId: asyncquery
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncQuery'
description: Query information to be submitted
required: true
responses:
"200":
content:
application/json:
schema:
type: string
description: The query is accepted for processing and the Response will
be sent to the callback url when complete.
"400":
content:
application/json:
schema:
type: string
description: Bad request. The request is invalid according to this OpenAPI
schema OR a specific identifier is believed to be invalid somehow (not
just unrecognized).
"500":
content:
application/json:
schema:
type: string
description: Internal server error.
"501":
content:
application/json:
schema:
type: string
description: Not implemented.
summary: Initiate a query with a callback to receive the response
tags:
- asyncquery
x-openapi-router-controller: openapi_server.controllers.asyncquery_controller
/entity:
get:
operationId: get_entity
parameters:
- description: A string to search by (name, abbreviation, CURIE, etc.). The
parameter may be repeated for multiple search strings.
explode: true
in: query
name: q
required: true
schema:
example:
- MESH:D014867
- NCIT:C34373
items:
type: string
type: array
style: form
responses:
"200":
content:
application/json:
schema:
type: object
description: successful operation
"404":
description: Entity not found
summary: Obtain CURIE and synonym information about a search term
tags:
- entity
x-openapi-router-controller: openapi_server.controllers.entity_controller
post:
operationId: post_entity
requestBody:
content:
application/json:
schema:
type: object
description: List of terms to get information about
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/EntityQuery'
description: successful operation
"404":
description: Entity not found
summary: Obtain CURIE and synonym information about search terms
tags:
- entity
x-openapi-router-controller: openapi_server.controllers.entity_controller
/exampleQuestions:
get:
operationId: example_questions
responses:
"200":
content:
application/json:
schema:
items:
type: object
type: array
description: successful operation
summary: Request a list of example questions that ARAX can answer
tags:
- exampleQuestions
x-openapi-router-controller: openapi_server.controllers.example_questions_controller
/meta_knowledge_graph:
get:
operationId: meta_knowledge_graph
parameters:
- description: Provide meta_knowledge_graph information in a format other than
the default. Default value is 'full'. Also permitted is 'simple'
explode: true
in: query
name: format
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/MetaKnowledgeGraph'
description: Returns meta knowledge graph representation of this TRAPI web
service.
summary: Meta knowledge graph representation of this TRAPI web service.
tags:
- meta_knowledge_graph
x-openapi-router-controller: openapi_server.controllers.meta_knowledge_graph_controller
/query:
post:
operationId: query
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Query'
description: Query information to be submitted
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
description: OK. There may or may not be results. Note that some of the
provided identifiers may not have been recognized.
"400":
content:
application/json:
schema:
type: string
description: Bad request. The request is invalid according to this OpenAPI
schema OR a specific identifier is believed to be invalid somehow (not
just unrecognized).
"500":
content:
application/json:
schema:
type: string
description: Internal server error.
"501":
content:
application/json:
schema:
type: string
description: Not implemented.
summary: Initiate a query and wait to receive a Response
tags:
- query
x-openapi-router-controller: openapi_server.controllers.query_controller
/response:
post:
operationId: post_response
requestBody:
content:
application/json:
schema:
type: object
description: Object that provides annotation information
required: true
responses:
"200":
content:
application/json:
schema:
type: object
description: successful operation
"400":
description: Invalid request
summary: Annotate a response
tags:
- response
x-openapi-router-controller: openapi_server.controllers.response_controller
/response/{response_id}:
get:
operationId: get_response
parameters:
- description: Identifier of the response to return
example: 41651
explode: false
in: path
name: response_id
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
description: successful operation
"404":
description: response_id not found
summary: Request a previously stored response from the server
tags:
- response
x-openapi-router-controller: openapi_server.controllers.response_controller
/status:
get:
operationId: get_status
parameters:
- description: Limit results to the past N hours
explode: true
in: query
name: last_n_hours
required: false
schema:
example: 6
type: integer
style: form
- description: Identifier of the log entry
explode: true
in: query
name: id
required: false
schema:
example: 10
type: integer
style: form
- description: PID of an ongoing query to terminate
explode: true
in: query
name: terminate_pid
required: false
schema:
type: integer
style: form
- description: Authorization string required for certain calls to status
explode: true
in: query
name: authorization
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
type: object
description: successful operation
"404":
description: Entity not found
summary: Obtain status information about the endpoint
tags:
- status
x-openapi-router-controller: openapi_server.controllers.status_controller
/status/logs:
get:
operationId: get_logs
parameters:
- description: Specify the log sending mode
explode: true
in: query
name: mode
required: false
schema:
example: tail
type: string
style: form
responses:
"200":
content:
text/plain:
schema:
type: string
description: successful operation
"404":
description: Logs not found
summary: Get log information from the server
tags:
- status
x-openapi-router-controller: openapi_server.controllers.status_controller
/translate:
post:
operationId: translate
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Question'
description: Question information to be translated
required: true
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/Query'
type: array
description: successful operation
"400":
description: Invalid status value
summary: Translate natural language question into a standardized query
tags:
- translate
x-openapi-router-controller: openapi_server.controllers.translate_controller
components:
schemas:
Query:
additionalProperties: true
description: The Query class is used to package a user request for information.
A Query object consists of a required Message object with optional additional
properties. Additional properties are intended to convey implementation-specific
or query-independent parameters. For example, an additional property specifying
a log level could allow a user to override the default log level in order
to receive more fine-grained log information when debugging an issue.
example:
submitter: Example
bypass_cache: false
page_number: 1
log_level: DEBUG
enforce_edge_directionality: false
return_minimal_metadata: false
max_results: 100
stream_progress: false
message:
query_graph:
edges:
e00:
subject: n00
object: n01
predicates:
- biolink:physically_interacts_with
nodes:
n00:
ids:
- CHEMBL.COMPOUND:CHEMBL112
n01:
categories:
- biolink:Protein
page_size: 100
properties:
message:
$ref: '#/components/schemas/Message'
log_level:
allOf:
- $ref: '#/components/schemas/LogLevel'
description: The least critical level of logs to return
nullable: true
workflow:
description: List of workflow steps to be executed.
items:
oneOf:
- $ref: '#/components/schemas/OperationAnnotate'
- $ref: '#/components/schemas/OperationAnnotateEdges'
- $ref: '#/components/schemas/OperationAnnotateNodes'
- $ref: '#/components/schemas/OperationBind'
- $ref: '#/components/schemas/OperationCompleteResults'
- $ref: '#/components/schemas/OperationEnrichResults'
- $ref: '#/components/schemas/OperationFill'
- $ref: '#/components/schemas/OperationFilterKgraph'
- $ref: '#/components/schemas/OperationFilterKgraphContinuousKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKnodeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphOrphans'
- $ref: '#/components/schemas/OperationFilterKgraphPercentile'
- $ref: '#/components/schemas/OperationFilterKgraphStdDev'
- $ref: '#/components/schemas/OperationFilterKgraphTopN'
- $ref: '#/components/schemas/OperationFilterResults'
- $ref: '#/components/schemas/OperationFilterResultsTopN'
- $ref: '#/components/schemas/OperationLookup'
- $ref: '#/components/schemas/OperationOverlay'
- $ref: '#/components/schemas/OperationOverlayComputeJaccard'
- $ref: '#/components/schemas/OperationOverlayComputeNgd'
- $ref: '#/components/schemas/OperationOverlayConnectKnodes'
- $ref: '#/components/schemas/OperationOverlayFisherExactTest'
- $ref: '#/components/schemas/OperationRestate'
- $ref: '#/components/schemas/OperationScore'
- $ref: '#/components/schemas/OperationSortResults'
- $ref: '#/components/schemas/OperationSortResultsEdgeAttribute'
- $ref: '#/components/schemas/OperationSortResultsNodeAttribute'
- $ref: '#/components/schemas/OperationSortResultsScore'
nullable: true
type: array
submitter:
description: Any string for self-identifying the submitter of a query. The
purpose of this optional field is to aid in the tracking of the source
of queries for development and issue resolution.
nullable: true
type: string
bypass_cache:
default: false
description: Set to true in order to bypass any possible cached response
and try to answer the query from scratch
type: boolean
stream_progress:
default: false
description: Set to true in order to receive a stream of LogEntry objects
as the query is progressing
type: boolean
enforce_edge_directionality:
default: false
description: Set to true in order to enforce edge directionality during
queries. By default, edge directionality can be reversed without penalty.
type: boolean
return_minimal_metadata:
default: false
description: Set to true in order to return only the most minimal metadata.
By default, rich metadata for nodes and edges are supplied, which may
cause a very large and slower Response.
type: boolean
max_results:
default: 100
description: Maximum number of individual results to return
example: 100
type: integer
page_size:
default: 100
description: Split the results into pages with this number of results each
example: 100
type: integer
page_number:
default: 1
description: Page number of results when the number of results exceeds the
page_size, with page 1 as the first page
example: 1
type: integer
operations:
allOf:
- $ref: '#/components/schemas/Operations'
description: Container for one or more Message objects or identifiers for
one or more Messages along with a processing plan and options for how
those messages should be processed and returned
nullable: true
required:
- message
title: Query
type: object
x-body-name: request_body
AsyncQuery:
additionalProperties: true
description: The AsyncQuery class is effectively the same as the Query class
but it requires a callback property.
properties:
callback:
description: 'Upon completion, this server will send a POST request to the
callback URL with `Content-Type: application/json` header and request
body containing a JSON-encoded `Response` object. The server MAY POST
`Response` objects before work is fully complete to provide interim results
with a Response.status value of ''Running''. If a POST operation to the
callback URL does not succeed, the server SHOULD retry the POST at least
once.'
format: uri
pattern: ^https?://
type: string
message:
$ref: '#/components/schemas/Message'
log_level:
allOf:
- $ref: '#/components/schemas/LogLevel'
description: The least critical level of logs to return
nullable: true
workflow:
description: List of workflow steps to be executed.
items:
oneOf:
- $ref: '#/components/schemas/OperationAnnotate'
- $ref: '#/components/schemas/OperationAnnotateEdges'
- $ref: '#/components/schemas/OperationAnnotateNodes'
- $ref: '#/components/schemas/OperationBind'
- $ref: '#/components/schemas/OperationCompleteResults'
- $ref: '#/components/schemas/OperationEnrichResults'
- $ref: '#/components/schemas/OperationFill'
- $ref: '#/components/schemas/OperationFilterKgraph'
- $ref: '#/components/schemas/OperationFilterKgraphContinuousKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKnodeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphOrphans'
- $ref: '#/components/schemas/OperationFilterKgraphPercentile'
- $ref: '#/components/schemas/OperationFilterKgraphStdDev'
- $ref: '#/components/schemas/OperationFilterKgraphTopN'
- $ref: '#/components/schemas/OperationFilterResults'
- $ref: '#/components/schemas/OperationFilterResultsTopN'
- $ref: '#/components/schemas/OperationLookup'
- $ref: '#/components/schemas/OperationOverlay'
- $ref: '#/components/schemas/OperationOverlayComputeJaccard'
- $ref: '#/components/schemas/OperationOverlayComputeNgd'
- $ref: '#/components/schemas/OperationOverlayConnectKnodes'
- $ref: '#/components/schemas/OperationOverlayFisherExactTest'
- $ref: '#/components/schemas/OperationRestate'
- $ref: '#/components/schemas/OperationScore'
- $ref: '#/components/schemas/OperationSortResults'
- $ref: '#/components/schemas/OperationSortResultsEdgeAttribute'
- $ref: '#/components/schemas/OperationSortResultsNodeAttribute'
- $ref: '#/components/schemas/OperationSortResultsScore'
nullable: true
type: array
submitter:
description: Any string for self-identifying the submitter of a query. The
purpose of this optional field is to aid in the tracking of the source
of queries for development and issue resolution.
nullable: true
type: string
required:
- callback
- message
type: object
x-body-name: request_body
Response:
additionalProperties: true
description: The Response object contains the main payload when a TRAPI query
endpoint interprets and responds to the submitted query successfully (i.e.,
HTTP Status Code 200). The message property contains the knowledge of the
response (query graph, knowledge graph, and results). The status, description,
and logs properties provide additional details about the response.
example:
original_question: what proteins are affected by sickle cell anemia
validation_result: '{}'
submitter: submitter
workflow:
- ""
- ""
query_options:
coalesce: true
threshold: 0.9
restated_question: Which proteins are affected by sickle cell anemia?
description: Success. 42 results found.
message:
query_graph:
edges:
e00:
subject: n00
object: n01
predicates:
- biolink:physically_interacts_with
nodes:
n00:
ids:
- CHEMBL.COMPOUND:CHEMBL112
n01:
categories:
- biolink:Protein
type: TranslatorAPIResponse
total_results_count: 0
schema_version: 1.2.0
datetime: 2021-01-09 12:34:45
operations: ""
table_column_names:
- chemical_substance.name
- chemical_substance.id
tool_version: ARAX 0.8.0
context: https://rtx.ncats.io/ns/translator.jsonld
reasoner_id: ARAX
id: https://arax.ncats.io/api/rtx/v1.2/response/123
logs:
- code: code
level: ""
message: message
timestamp: 2020-09-03T18:13:49Z
- code: code
level: ""
message: message
timestamp: 2020-09-03T18:13:49Z
status: Success
info: info
properties:
message:
$ref: '#/components/schemas/Message'
status:
description: One of a standardized set of short codes, e.g. Success, QueryNotTraversable,
KPsNotAvailable
example: Success
nullable: true
type: string
description:
description: A brief human-readable description of the outcome
example: Success. 42 results found.
nullable: true
type: string
logs:
description: Log entries containing errors, warnings, debugging information,
etc
items:
$ref: '#/components/schemas/LogEntry'
nullable: true
type: array
workflow:
description: A list of operations that were executed.
items:
oneOf:
- $ref: '#/components/schemas/OperationAnnotate'
- $ref: '#/components/schemas/OperationAnnotateEdges'
- $ref: '#/components/schemas/OperationAnnotateNodes'
- $ref: '#/components/schemas/OperationBind'
- $ref: '#/components/schemas/OperationCompleteResults'
- $ref: '#/components/schemas/OperationEnrichResults'
- $ref: '#/components/schemas/OperationFill'
- $ref: '#/components/schemas/OperationFilterKgraph'
- $ref: '#/components/schemas/OperationFilterKgraphContinuousKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKedgeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphDiscreteKnodeAttribute'
- $ref: '#/components/schemas/OperationFilterKgraphOrphans'
- $ref: '#/components/schemas/OperationFilterKgraphPercentile'
- $ref: '#/components/schemas/OperationFilterKgraphStdDev'
- $ref: '#/components/schemas/OperationFilterKgraphTopN'
- $ref: '#/components/schemas/OperationFilterResults'
- $ref: '#/components/schemas/OperationFilterResultsTopN'
- $ref: '#/components/schemas/OperationLookup'
- $ref: '#/components/schemas/OperationOverlay'
- $ref: '#/components/schemas/OperationOverlayComputeJaccard'
- $ref: '#/components/schemas/OperationOverlayComputeNgd'
- $ref: '#/components/schemas/OperationOverlayConnectKnodes'
- $ref: '#/components/schemas/OperationOverlayFisherExactTest'
- $ref: '#/components/schemas/OperationRestate'
- $ref: '#/components/schemas/OperationScore'
- $ref: '#/components/schemas/OperationSortResults'
- $ref: '#/components/schemas/OperationSortResultsEdgeAttribute'
- $ref: '#/components/schemas/OperationSortResultsNodeAttribute'
- $ref: '#/components/schemas/OperationSortResultsScore'
type: array
submitter:
description: Any string for self-identifying the submitter of a query. The
purpose of this optional field is to aid in the tracking of the source
of queries for development and issue resolution.
nullable: true
type: string
operations:
allOf:
- $ref: '#/components/schemas/Operations'
description: Container for one or more Message objects or identifiers for
one or more Messages along with the processing plan and options for how
those messages were processed and returned
reasoner_id:
description: Identifier string of the reasoner that provided this response
(one of ARAX, Robokop, etc.)
example: ARAX
type: string
tool_version:
description: Version label of the tool that generated this response
example: ARAX 0.8.0
type: string
schema_version:
description: Version label of this TRAPI schema
example: 1.2.0
type: string
datetime:
description: Datetime string for the time that this response was generated
example: 2021-01-09 12:34:45
type: string
table_column_names:
description: List of column names that corresponds to the row_data for each
result
example:
- chemical_substance.name
- chemical_substance.id
items:
type: string
type: array
original_question:
description: The original question text typed in by the user
example: what proteins are affected by sickle cell anemia
type: string
restated_question:
description: A precise restatement of the question, as understood by the
Translator, for which the answer applies. The user should verify that
the restated question matches the intent of their original question (it
might not).
example: Which proteins are affected by sickle cell anemia?
type: string
query_options:
description: Dict of options that can be sent with the query. Options are
tool specific and not stipulated here
example:
coalesce: true
threshold: 0.9
type: object
context:
description: JSON-LD context URI
example: https://rtx.ncats.io/ns/translator.jsonld
type: string
type:
description: Entity type of this response
example: TranslatorAPIResponse
type: string
id:
description: URI for this response
example: https://arax.ncats.io/api/rtx/v1.2/response/123
type: string
validation_result:
description: Validation results and other summary stats computed for this
Response.
type: object
total_results_count:
description: The total number of results that were generated prior to any
filtering.
nullable: true
type: integer
info:
description: A placholder for including some additional information
nullable: true
type: string
required:
- message
title: Response
type: object
Message:
additionalProperties: false
description: 'The message object holds the main content of a Query or a Response
in three properties: query_graph, results, and knowledge_graph. The query_graph
property contains the query configuration, the results property contains any
answers that are returned by the service, and knowledge_graph property contains
lists of edges and nodes in the thought graph corresponding to this message.
The content of these properties is context-dependent to the encompassing object
and the TRAPI operation requested.'
example:
query_graph:
edges:
e00:
subject: n00
object: n01
predicates:
- biolink:physically_interacts_with
nodes:
n00:
ids:
- CHEMBL.COMPOUND:CHEMBL112
n01:
categories:
- biolink:Protein
properties:
results:
description: List of all returned Result objects for the query posed
items:
$ref: '#/components/schemas/Result'
nullable: true
type: array
query_graph:
allOf:
- $ref: '#/components/schemas/QueryGraph'
description: QueryGraph object that contains a serialization of a query
in the form of a graph
nullable: true
knowledge_graph:
allOf:
- $ref: '#/components/schemas/KnowledgeGraph'
description: KnowledgeGraph object that contains lists of nodes and edges
in the thought graph corresponding to the message
nullable: true
title: Message
type: object
LogEntry:
additionalProperties: true
description: The LogEntry object contains information useful for tracing and
debugging across Translator components. Although an individual component
(for example, an ARA or KP) may have its own logging and debugging infrastructure,
this internal information is not, in general, available to other components.
In addition to a timestamp and logging level, LogEntry includes a string intended
to be read by a human, along with one of a standardized set of codes describing
the condition of the component sending the message.
example:
code: code
level: ""
message: message
timestamp: 2020-09-03T18:13:49Z
properties:
timestamp:
description: Timestamp in ISO 8601 format
example: 2020-09-03T18:13:49Z
format: date-time
nullable: true
type: string
level:
allOf:
- $ref: '#/components/schemas/LogLevel'
nullable: true
code:
description: One of a standardized set of short codes e.g. QueryNotTraversable,
KPNotAvailable, KPResponseMalformed
nullable: true
type: string
message:
description: A human-readable log message
nullable: true
type: string
title: LogEntry
type: object
LogLevel:
description: Logging level
enum:
- ERROR
- WARNING
- INFO
- DEBUG
example: DEBUG
type: string
x-nullable: true
Result:
additionalProperties: true
description: A Result object specifies the nodes and edges in the knowledge
graph that satisfy the structure or conditions of a user-submitted query graph.
It must contain a NodeBindings object (list of query graph node to knowledge
graph node mappings) and an EdgeBindings object (list of query graph edge
to knowledge graph edge mappings).
properties:
node_bindings:
additionalProperties:
items:
$ref: '#/components/schemas/NodeBinding'
type: array
description: The dictionary of Input Query Graph to Result Knowledge Graph
node bindings where the dictionary keys are the key identifiers of the
Query Graph nodes and the associated values of those keys are instances
of NodeBinding schema type (see below). This value is an array of NodeBindings