forked from Materials-Consortia/optimade-python-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_openapi.json
1821 lines (1821 loc) · 72.7 KB
/
index_openapi.json
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.2",
"info": {
"title": "OPTIMADE API - Index meta-database",
"description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\nThis is the \"special\" index meta-database.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.12.7) v0.12.7.",
"version": "1.0.0"
},
"paths": {
"/info": {
"get": {
"tags": [
"Info"
],
"summary": "Get Info",
"operationId": "get_info_info_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response Get Info Info Get",
"anyOf": [
{
"$ref": "#/components/schemas/IndexInfoResponse"
},
{
"$ref": "#/components/schemas/ErrorResponse"
}
]
}
}
}
}
}
}
},
"/links": {
"get": {
"tags": [
"Links"
],
"summary": "Get Links",
"operationId": "get_links_links_get",
"parameters": [
{
"description": "A filter string, in the format described in section API Filtering Format Specification of the specification.",
"required": false,
"schema": {
"title": "Filter",
"type": "string",
"description": "A filter string, in the format described in section API Filtering Format Specification of the specification.",
"default": ""
},
"name": "filter",
"in": "query"
},
{
"description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`",
"required": false,
"schema": {
"title": "Response Format",
"type": "string",
"description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`",
"default": "json"
},
"name": "response_format",
"in": "query"
},
{
"description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/[email protected]`",
"required": false,
"schema": {
"title": "Email Address",
"type": "string",
"description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/[email protected]`",
"format": "email",
"default": ""
},
"name": "email_address",
"in": "query"
},
{
"description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`",
"required": false,
"schema": {
"title": "Response Fields",
"pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?",
"type": "string",
"description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`",
"default": ""
},
"name": "response_fields",
"in": "query"
},
{
"description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/<entries>` endpoint MUST include, for each field name `<fieldname>` in its `data.properties.<fieldname>` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.",
"required": false,
"schema": {
"title": "Sort",
"pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?",
"type": "string",
"description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/<entries>` endpoint MUST include, for each field name `<fieldname>` in its `data.properties.<fieldname>` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.",
"default": ""
},
"name": "sort",
"in": "query"
},
{
"description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`",
"required": false,
"schema": {
"title": "Page Limit",
"minimum": 0.0,
"type": "integer",
"description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`",
"default": 20
},
"name": "page_limit",
"in": "query"
},
{
"description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.",
"required": false,
"schema": {
"title": "Page Offset",
"minimum": 0.0,
"type": "integer",
"description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.",
"default": 0
},
"name": "page_offset",
"in": "query"
},
{
"description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.",
"required": false,
"schema": {
"title": "Page Number",
"minimum": 0.0,
"type": "integer",
"description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.",
"default": 0
},
"name": "page_number",
"in": "query"
},
{
"description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.",
"required": false,
"schema": {
"title": "Page Cursor",
"minimum": 0.0,
"type": "integer",
"description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.",
"default": 0
},
"name": "page_cursor",
"in": "query"
},
{
"description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.",
"required": false,
"schema": {
"title": "Page Above",
"minimum": 0.0,
"type": "integer",
"description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.",
"default": 0
},
"name": "page_above",
"in": "query"
},
{
"description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.",
"required": false,
"schema": {
"title": "Page Below",
"minimum": 0.0,
"type": "integer",
"description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.",
"default": 0
},
"name": "page_below",
"in": "query"
},
{
"description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.",
"required": false,
"schema": {
"title": "Include",
"type": "string",
"description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.",
"default": "references"
},
"name": "include",
"in": "query"
},
{
"description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.",
"required": false,
"schema": {
"title": "Api Hint",
"pattern": "(v[0-9]+(\\.[0-9]+)?)?",
"type": "string",
"description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.",
"default": ""
},
"name": "api_hint",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response Get Links Links Get",
"anyOf": [
{
"$ref": "#/components/schemas/LinksResponse"
},
{
"$ref": "#/components/schemas/ErrorResponse"
}
]
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/versions": {
"get": {
"tags": [
"Versions"
],
"summary": "Get Versions",
"description": "Respond with the text/csv representation for the served versions.",
"operationId": "get_versions_versions_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"text/csv; header=present": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Aggregate": {
"title": "Aggregate",
"enum": [
"ok",
"test",
"staging",
"no"
],
"description": "Enumeration of aggregate values"
},
"Attributes": {
"title": "Attributes",
"type": "object",
"properties": {},
"description": "Members of the attributes object (\"attributes\") represent information about the resource object in which it's defined.\nThe keys for Attributes MUST NOT be:\n relationships\n links\n id\n type"
},
"AvailableApiVersion": {
"title": "AvailableApiVersion",
"required": [
"url",
"version"
],
"type": "object",
"properties": {
"url": {
"title": "Url",
"maxLength": 65536,
"minLength": 1,
"pattern": ".+/v[0-1](\\.[0-9]+)*/?$",
"type": "string",
"description": "A string specifying a versioned base URL that MUST adhere to the rules in section Base URL",
"format": "uri"
},
"version": {
"title": "Version",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string",
"description": "A string containing the full version number of the API served at that versioned base URL.\nThe version number string MUST NOT be prefixed by, e.g., 'v'.\nExamples: `1.0.0`, `1.0.0-rc.2`."
}
},
"description": "A JSON object containing information about an available API version"
},
"BaseRelationshipMeta": {
"title": "BaseRelationshipMeta",
"required": [
"description"
],
"type": "object",
"properties": {
"description": {
"title": "Description",
"type": "string",
"description": "OPTIONAL human-readable description of the relationship"
}
},
"description": "Specific meta field for base relationship resource"
},
"BaseRelationshipResource": {
"title": "BaseRelationshipResource",
"required": [
"id",
"type"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"description": "Resource ID"
},
"type": {
"title": "Type",
"type": "string",
"description": "Resource type"
},
"meta": {
"title": "Meta",
"allOf": [
{
"$ref": "#/components/schemas/BaseRelationshipMeta"
}
],
"description": "Relationship meta field. MUST contain 'description' if supplied."
}
},
"description": "Minimum requirements to represent a relationship resource"
},
"EntryRelationships": {
"title": "EntryRelationships",
"type": "object",
"properties": {
"references": {
"title": "References",
"allOf": [
{
"$ref": "#/components/schemas/ReferenceRelationship"
}
],
"description": "Object containing links to relationships with entries of the `references` type."
},
"structures": {
"title": "Structures",
"allOf": [
{
"$ref": "#/components/schemas/StructureRelationship"
}
],
"description": "Object containing links to relationships with entries of the `structures` type."
}
},
"description": "This model wraps the JSON API Relationships to include type-specific top level keys. "
},
"EntryResource": {
"title": "EntryResource",
"required": [
"id",
"type",
"attributes"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`"
},
"type": {
"title": "Type",
"type": "string",
"description": "The name of the type of an entry.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type `<type>` and ID `<id>` MUST be returned in response to a request for `/<type>/<id>` under the versioned base URL.\n\n- **Example**: `\"structures\"`"
},
"links": {
"title": "Links",
"allOf": [
{
"$ref": "#/components/schemas/ResourceLinks"
}
],
"description": "a links object containing links related to the resource."
},
"meta": {
"title": "Meta",
"allOf": [
{
"$ref": "#/components/schemas/Meta"
}
],
"description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship."
},
"attributes": {
"title": "Attributes",
"allOf": [
{
"$ref": "#/components/schemas/EntryResourceAttributes"
}
],
"description": "A dictionary, containing key-value pairs representing the entry's properties, except for `type` and `id`.\nDatabase-provider-specific properties need to include the database-provider-specific prefix (see section on Database-Provider-Specific Namespace Prefixes)."
},
"relationships": {
"title": "Relationships",
"allOf": [
{
"$ref": "#/components/schemas/EntryRelationships"
}
],
"description": "A dictionary containing references to other entries according to the description in section Relationships encoded as [JSON API Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships).\nThe OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object."
}
},
"description": "The base model for an entry resource."
},
"EntryResourceAttributes": {
"title": "EntryResourceAttributes",
"required": [
"last_modified"
],
"type": "object",
"properties": {
"immutable_id": {
"title": "Immutable Id",
"type": "string",
"description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)"
},
"last_modified": {
"title": "Last Modified",
"type": "string",
"description": "Date and time representing when the entry was last modified.\n\n- **Type**: timestamp.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property.\n\n- **Example**:\n - As part of JSON response format: `\"2007-04-05T14:30:20Z\"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.)",
"format": "date-time"
}
},
"description": "Contains key-value pairs representing the entry's properties."
},
"Error": {
"title": "Error",
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"description": "A unique identifier for this particular occurrence of the problem."
},
"links": {
"title": "Links",
"allOf": [
{
"$ref": "#/components/schemas/ErrorLinks"
}
],
"description": "A links object storing about"
},
"status": {
"title": "Status",
"type": "string",
"description": "the HTTP status code applicable to this problem, expressed as a string value."
},
"code": {
"title": "Code",
"type": "string",
"description": "an application-specific error code, expressed as a string value."
},
"title": {
"title": "Title",
"type": "string",
"description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization."
},
"detail": {
"title": "Detail",
"type": "string",
"description": "A human-readable explanation specific to this occurrence of the problem."
},
"source": {
"title": "Source",
"allOf": [
{
"$ref": "#/components/schemas/ErrorSource"
}
],
"description": "An object containing references to the source of the error"
},
"meta": {
"title": "Meta",
"allOf": [
{
"$ref": "#/components/schemas/Meta"
}
],
"description": "a meta object containing non-standard meta-information about the error."
}
},
"description": "An error response"
},
"ErrorLinks": {
"title": "ErrorLinks",
"type": "object",
"properties": {
"about": {
"title": "About",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 65536,
"format": "uri"
},
{
"$ref": "#/components/schemas/Link"
}
],
"description": "A link that leads to further details about this particular occurrence of the problem."
}
},
"description": "A Links object specific to Error objects"
},
"ErrorResponse": {
"title": "ErrorResponse",
"required": [
"meta",
"errors"
],
"type": "object",
"properties": {
"data": {
"title": "Data",
"uniqueItems": true,
"anyOf": [
{
"$ref": "#/components/schemas/Resource"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Resource"
}
}
],
"description": "Outputted Data"
},
"meta": {
"title": "Meta",
"allOf": [
{
"$ref": "#/components/schemas/ResponseMeta"
}
],
"description": "A meta object containing non-standard information"
},
"errors": {
"title": "Errors",
"uniqueItems": true,
"type": "array",
"items": {
"$ref": "#/components/schemas/OptimadeError"
},
"description": "A list of OPTIMADE-specific JSON API error objects, where the field detail MUST be present."
},
"included": {
"title": "Included",
"uniqueItems": true,
"type": "array",
"items": {
"$ref": "#/components/schemas/Resource"
},
"description": "A list of unique included resources"
},
"links": {
"title": "Links",
"allOf": [
{
"$ref": "#/components/schemas/ToplevelLinks"
}
],
"description": "Links associated with the primary data or errors"
},
"jsonapi": {
"title": "Jsonapi",
"allOf": [
{
"$ref": "#/components/schemas/JsonApi"
}
],
"description": "Information about the JSON API used"
}
},
"description": "errors MUST be present and data MUST be skipped"
},
"ErrorSource": {
"title": "ErrorSource",
"type": "object",
"properties": {
"pointer": {
"title": "Pointer",
"type": "string",
"description": "a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. \"/data\" for a primary data object, or \"/data/attributes/title\" for a specific attribute]."
},
"parameter": {
"title": "Parameter",
"type": "string",
"description": "a string indicating which URI query parameter caused the error."
}
},
"description": "an object containing references to the source of the error"
},
"HTTPValidationError": {
"title": "HTTPValidationError",
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"type": "array",
"items": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
},
"Implementation": {
"title": "Implementation",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"description": "name of the implementation"
},
"version": {
"title": "Version",
"type": "string",
"description": "version string of the current implementation"
},
"homepage": {
"title": "Homepage",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 65536,
"format": "uri"
},
{
"$ref": "#/components/schemas/Link"
}
],
"description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) pointing to the homepage of the implementation."
},
"source_url": {
"title": "Source Url",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 65536,
"format": "uri"
},
{
"$ref": "#/components/schemas/Link"
}
],
"description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) pointing to the implementation source, either downloadable archive or version control system."
},
"maintainer": {
"title": "Maintainer",
"allOf": [
{
"$ref": "#/components/schemas/ImplementationMaintainer"
}
],
"description": "A dictionary providing details about the maintainer of the implementation."
}
},
"description": "Information on the server implementation"
},
"ImplementationMaintainer": {
"title": "ImplementationMaintainer",
"required": [
"email"
],
"type": "object",
"properties": {
"email": {
"title": "Email",
"type": "string",
"description": "the maintainer's email address",
"format": "email"
}
},
"description": "Details about the maintainer of the implementation"
},
"IndexInfoAttributes": {
"title": "IndexInfoAttributes",
"required": [
"api_version",
"available_api_versions",
"available_endpoints",
"entry_types_by_format"
],
"type": "object",
"properties": {
"api_version": {
"title": "Api Version",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string",
"description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`."
},
"available_api_versions": {
"title": "Available Api Versions",
"type": "array",
"items": {
"$ref": "#/components/schemas/AvailableApiVersion"
},
"description": "A list of dictionaries of available API versions at other base URLs"
},
"formats": {
"title": "Formats",
"type": "array",
"items": {
"type": "string"
},
"description": "List of available output formats.",
"default": [
"json"
]
},
"available_endpoints": {
"title": "Available Endpoints",
"type": "array",
"items": {
"type": "string"
},
"description": "List of available endpoints (i.e., the string to be appended to the versioned base URL)."
},
"entry_types_by_format": {
"title": "Entry Types By Format",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Available entry endpoints as a function of output formats."
},
"is_index": {
"title": "Is Index",
"type": "boolean",
"description": "This must be `true` since this is an index meta-database (see section Index Meta-Database)."
}
},
"description": "Attributes for Base URL Info endpoint for an Index Meta-Database"
},
"IndexInfoResource": {
"title": "IndexInfoResource",
"required": [
"id",
"type",
"attributes",
"relationships"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"pattern": "^/$",
"type": "string"
},
"type": {
"title": "Type",
"pattern": "^info$",
"type": "string"
},
"links": {
"title": "Links",
"allOf": [
{
"$ref": "#/components/schemas/ResourceLinks"
}
],
"description": "a links object containing links related to the resource."
},
"meta": {
"title": "Meta",
"allOf": [
{
"$ref": "#/components/schemas/Meta"
}
],
"description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship."
},
"attributes": {
"$ref": "#/components/schemas/IndexInfoAttributes"
},
"relationships": {
"title": "Relationships",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/IndexRelationship"
},
"description": "Reference to the Links identifier object under the `links` endpoint that the provider has chosen as their 'default' OPTIMADE API database.\nA client SHOULD present this database as the first choice when an end-user chooses this provider."
}
},
"description": "Index Meta-Database Base URL Info endpoint resource"
},
"IndexInfoResponse": {
"title": "IndexInfoResponse",
"required": [
"data",
"meta"
],
"type": "object",
"properties": {
"data": {
"title": "Data",
"allOf": [
{
"$ref": "#/components/schemas/IndexInfoResource"
}
],
"description": "Index meta-database /info data"
},
"meta": {
"title": "Meta",
"allOf": [
{
"$ref": "#/components/schemas/ResponseMeta"
}
],
"description": "A meta object containing non-standard information"
},
"errors": {
"title": "Errors",
"uniqueItems": true,
"type": "array",
"items": {
"$ref": "#/components/schemas/Error"
},
"description": "A list of unique errors"
},
"included": {
"title": "Included",
"uniqueItems": true,
"type": "array",
"items": {
"$ref": "#/components/schemas/Resource"
},
"description": "A list of unique included resources"
},
"links": {
"title": "Links",
"allOf": [
{
"$ref": "#/components/schemas/ToplevelLinks"
}
],
"description": "Links associated with the primary data or errors"
},
"jsonapi": {
"title": "Jsonapi",
"allOf": [
{
"$ref": "#/components/schemas/JsonApi"
}
],
"description": "Information about the JSON API used"
}
},
"description": "errors are not allowed"
},
"IndexRelationship": {
"title": "IndexRelationship",
"required": [
"data"
],
"type": "object",
"properties": {
"data": {
"title": "Data",
"allOf": [
{
"$ref": "#/components/schemas/RelatedLinksResource"
}
],
"description": "[JSON API resource linkage](http://jsonapi.org/format/1.0/#document-links).\nIt MUST be either `null` or contain a single Links identifier object with the fields `id` and `type`"
}
},
"description": "Index Meta-Database relationship"
},
"JsonApi": {
"title": "JsonApi",
"type": "object",
"properties": {
"version": {
"title": "Version",
"type": "string",
"description": "Version of the json API used",
"default": "1.0"
},
"meta": {
"title": "Meta",
"allOf": [
{
"$ref": "#/components/schemas/Meta"
}
],
"description": "Non-standard meta information"
}
},
"description": "An object describing the server's implementation"
},
"Link": {
"title": "Link",
"required": [
"href"
],
"type": "object",
"properties": {
"href": {
"title": "Href",
"maxLength": 65536,
"minLength": 1,
"type": "string",
"description": "a string containing the link\u2019s URL.",
"format": "uri"
},
"meta": {
"title": "Meta",
"allOf": [
{
"$ref": "#/components/schemas/Meta"
}
],
"description": "a meta object containing non-standard meta-information about the link."
}
},
"description": "A link **MUST** be represented as either: a string containing the link's URL or a link object."
},
"LinkType": {
"title": "LinkType",
"enum": [
"child",
"root",
"external",
"providers"
],
"description": "Enumeration of link_type values"
},
"LinksResource": {
"title": "LinksResource",
"required": [
"id",
"type",
"attributes"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string",
"description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`"
},
"type": {
"title": "Type",
"pattern": "^links$",
"type": "string",
"description": "These objects are described in detail in the section Links Endpoint"
},
"links": {
"title": "Links",
"allOf": [
{
"$ref": "#/components/schemas/ResourceLinks"
}
],
"description": "a links object containing links related to the resource."