-
Notifications
You must be signed in to change notification settings - Fork 18
/
fatcat-openapi2.yml
4174 lines (4099 loc) · 123 KB
/
fatcat-openapi2.yml
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
---
swagger: "2.0"
info:
title: fatcat
version: 0.5.0
description: |
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic
entities and file metadata.
<!-- STARTLONGDESCRIPTION -->
These API reference documents, along with client software libraries, are
generated automatically from an OpenAPI 2.0 ("Swagger") definition file.
## Introduction
A higher-level introduction to the API, as well as a description of the
fatcat data model, are available in ["The Fatcat Guide"](https://guide.fatcat.wiki/).
The guide also includes a [Cookbook](https://guide.fatcat.wiki/cookbook.html)
section demonstrating end-to-end tasks like creating entities as part of
editgroups, or safely merging duplicate entities.
### Expectations and Best Practices
A test/staging QA API instance of fatcat is available at
<https://api.qa.fatcat.wiki/v0>. The database backing this instance is
separate from the production interface, and is periodically rebuilt from
snapshots of the full production database, meaning that edits on the QA
server will *NOT* persist, and that semantics like the changelog index
monotonically increasing *MAY* be broken. Developers are expexcted to test
their scripts and tools against the QA instance before running against
production.
NOTE: as of Spring 2021, the QA server is temporarily unavailable.
Fatcat is made available as a gratis (no cost) and libre (freedom
preserving) service to the public, with limited funding and resources. We
welcome new and unforeseen uses and contributions, but may need to impose
restrictions (like rate-limits) to keep the service functional for other
users, and in extreme cases reserve the option to block accounts and IP
ranges if necessary to keep the service operational.
The Internet Archive owns and operates it's own server equipment and data
centers, and operations are optimized for low-cost, not high-availability.
Users and partners should expect some downtime on the fatcat API, on the
order of hours a month.
Periodic metadata exports are available for batch processing, and database
snapshots can be used to create locally-hosted mirrors of the service for
more intensive and reliable querying.
### Other Nitty Gritties
Cross-origin requests are allowed for the API service, to enable third
parties to build in-browser applications.
A metadata search service is available at <https://search.fatcat.wiki>.
The API is currently the raw elasticsearch API, with only GET (read)
requests allowed. This public service is experimental and may be removed or
limited in the future.
## Authentication
The API allows basic read-only "GET" HTTP requests with no authentication.
Proposing changes to the metadata, or other mutating requests ("PUT",
"POST", "DELETE") all require authentication, and some operations require
additional account permissions.
End-user account creation and login happens through the web interface. From
a logged-in editor profile page, you can generate a API token. Tokens are
"macaroons", similar to JWT tokens, and are used for all API
authentication. The web interface includes macaroons in browser cookies and
passes them through to the API to authenticate editor actions.
<!-- ReDoc-Inject: <security-definitions> -->
<!-- ENDLONGDESCRIPTION -->
termsOfService: "https://guide.fatcat.wiki/policies.html"
contact:
name: "Internet Archive Web Group"
email: "webservices@archive.org"
url: "https://fatcat.wiki"
x-logo:
url: "https://fatcat.wiki/static/paper_man_confused.gif"
altText: "Confused Papers Man (Logo)"
backgroundColor: "#FFFFFF"
schemes: [https]
basePath: /v0
host: api.fatcat.wiki
consumes:
- application/json
produces:
- application/json
x-servers:
- url: https://api.fatcat.wiki/v0
description: "Production Server"
- url: https://api.qa.fatcat.wiki/v0
description: "QA Server"
securityDefinitions:
Bearer:
type: apiKey
name: Authorization
in: header
description: |
The only current API authentication mechanism is HTTP bearer
authentication using the `Authorization` HTTP header. The header should
be formatted as the string "Bearer", then a space, then API token (in the
usual base64 string encoding).
An example HTTP request would look on the wire like:
GET /v0/auth/check HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Authorization: Bearer AgEPZGV2LmZhdGNhdC53aWtpAhYyMDE5MDEwMS1kZXYtZHVtbXkta2V5AAImZWRpdG9yX2lkID0gYWFhYWFhYWFhYWFhYmt2a2FhYWFhYWFhYWkAAht0aW1lID4gMjAxOS0wMS0wOVQwMDo1Nzo1MloAAAYgnroNha1hSftChtxHGTnLEmM/pY8MeQS/jBSV0UNvXug=
Connection: keep-alive
Host: api.qa.fatcat.wiki
User-Agent: HTTPie/0.9.8
Headers can be passed on the command line using `http` (HTTPie) like:
http get https://api.qa.fatcat.wiki/v0/auth/check Authorization:"Bearer AgEPZGV2LmZhdGNhdC53aWtpAhYyMDE5MDEwMS1kZXYtZHVtbXkta2V5AAImZWRpdG9yX2lkID0gYWFhYWFhYWFhYWFhYmt2a2FhYWFhYWFhYWkAAht0aW1lID4gMjAxOS0wMS0wOVQwMDo1Nzo1MloAAAYgnroNha1hSftChtxHGTnLEmM/pY8MeQS/jBSV0UNvXug="
Or with `curl`:
curl -H "Authorization: Bearer AgEPZGV2LmZhdGNhdC53aWtpAhYyMDE5MDEwMS1kZXYtZHVtbXkta2V5AAImZWRpdG9yX2lkID0gYWFhYWFhYWFhYWFhYmt2a2FhYWFhYWFhYWkAAht0aW1lID4gMjAxOS0wMS0wOVQwMDo1Nzo1MloAAAYgnroNha1hSftChtxHGTnLEmM/pY8MeQS/jBSV0UNvXug=" https://qa.fatcat.wiki/v0/auth/check
tags: # TAGLINE
- name: containers # TAGLINE
x-displayName: "Containers" # TAGLINE
description: | # TAGLINE
**Container** entities represent publication venues like journals, # TAGLINE
conference proceedings, book series, or blogs. They group publications # TAGLINE
("releases"). # TAGLINE
See the "Catalog Style Guide" section of the guide for details and # TAGLINE
semantics of what should be included in specific entity fields. # TAGLINE
Specifically, the # TAGLINE
[Container Entity Reference](https://guide.fatcat.wiki/entity_container.html). # TAGLINE
- name: creators # TAGLINE
x-displayName: "Creators" # TAGLINE
description: | # TAGLINE
**Creator** entities represent individuals (or organizations, or other # TAGLINE
agents) who contribute to the creation of specific releases # TAGLINE
(publications). # TAGLINE
See the "Catalog Style Guide" section of the guide for details and # TAGLINE
semantics of what should be included in specific entity fields. # TAGLINE
Specifically, the # TAGLINE
[Creator Entity Reference](https://guide.fatcat.wiki/entity_creator.html). # TAGLINE
- name: files # TAGLINE
x-displayName: "Files" # TAGLINE
description: | # TAGLINE
**File** entities represent unique digital files which are full # TAGLINE
manifestations of specific releases (publications), such as fulltext PDF # TAGLINE
files, JATS XML documents, or video files. File entities also include a # TAGLINE
set of locations where they can be found on the public web. # TAGLINE
See the "Catalog Style Guide" section of the guide for details and # TAGLINE
semantics of what should be included in specific entity fields. # TAGLINE
Specifically, the # TAGLINE
[File Entity Reference](https://guide.fatcat.wiki/entity_file.html). # TAGLINE
- name: filesets # TAGLINE
x-displayName: "Filesets" # TAGLINE
description: | # TAGLINE
**Fileset** entities represent sets of digital files, as well as locations # TAGLINE
where they can be found on the public web. Filesets most commonly # TAGLINE
represent datasets consisting of several data and metadata files. # TAGLINE
See the "Catalog Style Guide" section of the guide for details and # TAGLINE
semantics of what should be included in specific entity fields. # TAGLINE
Specifically, the # TAGLINE
[Fileset Entity Reference](https://guide.fatcat.wiki/entity_fileset.html). # TAGLINE
- name: webcaptures # TAGLINE
x-displayName: "Webcaptures" # TAGLINE
description: | # TAGLINE
**Web Capture** entities represent archival snapshots of web pages (or # TAGLINE
other web resources), which are usually complete manifestations of a # TAGLINE
specific release entity. Web Captures also include a set of locations # TAGLINE
(wayback replay instances or WARC files) where the capture can be found. # TAGLINE
See the "Catalog Style Guide" section of the guide for details and # TAGLINE
semantics of what should be included in specific entity fields. # TAGLINE
Specifically, the # TAGLINE
[Web Capture Entity Reference](https://guide.fatcat.wiki/entity_webcapture.html). # TAGLINE
- name: releases # TAGLINE
x-displayName: "Releases" # TAGLINE
description: | # TAGLINE
**Release** entities represent specific published versions of a research # TAGLINE
work, such as a pre-print, a journal article, a book (or chapter), or a # TAGLINE
scholarly blog post. Releases are always grouped together under Works; # TAGLINE
they may be published in a specific Container; they may have known # TAGLINE
Creators; and there may exist known File/Fileset/WebCapture digital copies # TAGLINE
of the release. # TAGLINE
See the "Catalog Style Guide" section of the guide for details and # TAGLINE
semantics of what should be included in specific entity fields. # TAGLINE
Specifically, the # TAGLINE
[Release Entity Reference](https://guide.fatcat.wiki/entity_release.html). # TAGLINE
- name: works # TAGLINE
x-displayName: "Works" # TAGLINE
description: | # TAGLINE
**Work** entities group several Release entities which are different # TAGLINE
versions of the same abstract piece of research. For example, three # TAGLINE
release entities representing the pre-print, published article, and # TAGLINE
retraction stages of the same journal paper would be grouped under a # TAGLINE
single work. # TAGLINE
See the "Catalog Style Guide" section of the guide for details and # TAGLINE
semantics of what should be included in specific entity fields. # TAGLINE
Specifically, the # TAGLINE
[Work Entity Reference](https://guide.fatcat.wiki/entity_work.html). # TAGLINE
- name: editgroups # TAGLINE
x-displayName: "Editgroups" # TAGLINE
description: | # TAGLINE
**Editgroups** are sets of changes, each to individual entities in the # TAGLINE
catalog. Every edit must be part of an editgroup which is reviewed and # TAGLINE
accepted (merged) as a whole. # TAGLINE
- name: editors # TAGLINE
x-displayName: "Editors" # TAGLINE
description: | # TAGLINE
**Editors** are human user accounts and bots that make changes to the # TAGLINE
Fatcat catalog. # TAGLINE
The API allows fetching (and updating) metadata about individual editors, # TAGLINE
as well as fetching editor's annotation and edit history. # TAGLINE
- name: changelog # TAGLINE
x-displayName: "Changelog" # TAGLINE
description: | # TAGLINE
The **Changelog** is the ordered feed of editgroups which have been # TAGLINE
accepted into the catalog. # TAGLINE
- name: auth # TAGLINE
x-displayName: "Auth Methods" # TAGLINE
description: | # TAGLINE
Helper methods and internal APIs for editor authentication. # TAGLINE
x-tagGroups:
- name: Entities
tags:
- containers
- creators
- files
- filesets
- webcaptures
- releases
- works
- name: Editing
tags:
- editors
- editgroups
- changelog
- name: Other
tags:
- auth
# don't want these to be rust types (at least for now)
x-fatcat-ident: &FATCATIDENT
type: string
pattern: "[a-zA-Z2-7]{26}"
minLength: 26
maxLength: 26
description: "base32-encoded unique identifier"
x-fatcat-ident-example: &FATCATIDENTEXAMPLE
example: "q3nouwy3nnbsvo3h5klxsx4a7y"
x-fatcat-uuid: &FATCATUUID
type: string
pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
minLength: 36
maxLength: 36
description: "UUID (lower-case, dash-separated, hex-encoded 128-bit)"
x-fatcat-uuid-example: &FATCATUUIDEXAMPLE
example: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
x-issn: &FATCATISSN
type: string
pattern: "\\d{4}-\\d{3}[0-9X]"
minLength: 9
maxLength: 9
x-issn-example: &FATCATISSNEXAMPLE
example: "1234-5678"
x-orcid: &FATCATORCID
type: string
pattern: "\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]"
minLength: 19
maxLength: 19
description: "ORCiD (https://orcid.org) identifier"
x-orcid-example: &FATCATORCIDEXAMPLE
example: "0000-0002-1825-0097"
x-md5: &FATCATMD5
type: string
pattern: "[a-f0-9]{32}"
minLength: 32
maxLength: 32
description: "MD5 hash of data, in hex encoding"
x-md5-example: &FATCATMD5EXAMPLE
example: "1b39813549077b2347c0f370c3864b40"
x-sha1: &FATCATSHA1
type: string
pattern: "[a-f0-9]{40}"
minLength: 40
maxLength: 40
description: "SHA-1 hash of data, in hex encoding"
x-sha1-example: &FATCATSHA1EXAMPLE
example: "e9dd75237c94b209dc3ccd52722de6931a310ba3"
x-sha256: &FATCATSHA256
type: string
pattern: "[a-f0-9]{64}"
minLength: 64
maxLength: 64
description: "SHA-256 hash of data, in hex encoding"
x-sha256-example: &FATCATSHA256EXAMPLE
example: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"
# Common properties across entities
x-entity-props: &ENTITYPROPS
state:
type: string
enum: ["wip", "active", "redirect", "deleted"]
example: "active"
ident:
<<: *FATCATIDENT
<<: *FATCATIDENTEXAMPLE
revision:
<<: *FATCATUUID
<<: *FATCATUUIDEXAMPLE
redirect:
<<: *FATCATIDENT
<<: *FATCATIDENTEXAMPLE
extra:
type: object
description: |
Free-form JSON metadata that will be stored with the other entity
metadata. See guide for (unenforced) schema conventions.
additionalProperties: {}
edit_extra:
type: object
description: |
Free-form JSON metadata that will be stored with specific entity edits
(eg, creation/update/delete).
additionalProperties: {}
definitions:
error_response:
type: object
required:
- success
- error
- message
properties:
success:
type: boolean
example: false
error:
type: string
example: "unexpected-thing"
message:
type: string
example: "A really confusing, totally unexpected thing happened"
success:
type: object
required:
- success
- message
properties:
success:
type: boolean
example: true
message:
type: string
example: "The computers did the thing successfully!"
container_entity:
type: object
# required for creation: name
properties:
<<: *ENTITYPROPS
name:
type: string
description: "Name of the container (eg, Journal title). Required for entity creation."
example: "Journal of Important Results"
container_type:
type: string
description: "Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types."
example: "journal"
publication_status:
type: string
description: "Whether the container is active, discontinued, etc"
example: "active"
publisher:
type: string
description: |
Name of the organization or entity responsible for publication. Not
the complete imprint/brand.
example: "Society of Curious Students"
issnl:
description: "Linking ISSN number (ISSN-L). Should be valid and registered with issn.org"
<<: *FATCATISSN
<<: *FATCATISSNEXAMPLE
issne:
description: "Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org"
<<: *FATCATISSN
<<: *FATCATISSNEXAMPLE
issnp:
description: "Print ISSN number (ISSN-P). Should be valid and registered with issn.org"
<<: *FATCATISSN
<<: *FATCATISSNEXAMPLE
wikidata_qid:
type: string
example: "Q42812"
creator_entity:
type: object
# required for creation: display_name
properties:
<<: *ENTITYPROPS
display_name:
type: string
example: "Grace Hopper"
description: |
Name as should be displayed in web interface or in author lists (not
index/sorted). Required for valid entities.
given_name:
type: string
description: |
In English commonly the first name, but ordering is context and
culture specific.
surname:
type: string
description: |
In English commonly the last, or family name, but ordering is context
and culture specific.
orcid:
<<: *FATCATORCID
<<: *FATCATORCIDEXAMPLE
wikidata_qid:
type: string
example: "Q42812"
description: "Wikidata entity QID"
file_entity:
type: object
properties:
<<: *ENTITYPROPS
size:
type: integer
example: 1048576
format: int64
description: "Size of file in bytes. Non-zero."
md5:
<<: *FATCATMD5
<<: *FATCATMD5EXAMPLE
sha1:
<<: *FATCATSHA1
<<: *FATCATSHA1EXAMPLE
sha256:
<<: *FATCATSHA256
<<: *FATCATSHA256EXAMPLE
urls:
type: array
items:
$ref: "#/definitions/file_url"
mimetype:
type: string
example: "application/pdf"
content_scope:
type: string
example: "issue"
release_ids:
type: array
items:
<<: *FATCATIDENT
<<: *FATCATIDENTEXAMPLE
description: |
Set of identifier of release entities this file represents a full
manifestation of. Usually a single release, but some files contain
content of multiple full releases (eg, an issue of a journal).
releases:
description: |
Full release entities, included in GET responses when `releases`
included in `expand` parameter. Ignored if included in PUT or POST
requests.
type: array
items:
$ref: "#/definitions/release_entity"
file_url:
type: object
required:
- url
- rel
properties:
url:
type: string
format: url
example: "https://example.edu/~frau/prcding.pdf"
description: |
URL/URI pointing directly to a machine retrievable copy of this exact
file.
rel:
type: string
example: "web"
description: |
Indicates type of host this URL points to. Eg, "publisher",
"repository", "webarchive". See guide for list of acceptable values.
fileset_entity:
type: object
properties:
<<: *ENTITYPROPS
content_scope:
type: string
example: "issue"
manifest:
# limit of 200 files, at least to start
type: array
items:
$ref: "#/definitions/fileset_file"
urls:
type: array
items:
$ref: "#/definitions/fileset_url"
release_ids:
type: array
items:
<<: *FATCATIDENT
<<: *FATCATIDENTEXAMPLE
description: |
Set of identifier of release entities this fileset represents a full
manifestation of. Usually a single release.
releases:
type: array
items:
$ref: "#/definitions/release_entity"
description: |
Full release entities, included in GET responses when `releases`
included in `expand` parameter. Ignored if included in PUT or POST
requests.
fileset_url:
type: object
required:
- url
- rel
properties:
url:
type: string
format: url
example: "https://example.edu/~frau/prcding.pdf"
rel:
type: string
example: "webarchive"
description: |
Indicates type of host this URL points to. See guide for list of
acceptable values.
fileset_file:
type: object
required:
- path
- size
properties:
path:
type: string
example: "img/cat.png"
description: |
Path name of file within this fileset (eg, directory)
size:
type: integer
example: 1048576
format: int64
description: "File size in bytes"
md5:
<<: *FATCATMD5
<<: *FATCATMD5EXAMPLE
sha1:
<<: *FATCATSHA1
<<: *FATCATSHA1EXAMPLE
sha256:
<<: *FATCATSHA256
<<: *FATCATSHA256EXAMPLE
mimetype:
type: string
example: "application/pdf"
extra:
type: object
additionalProperties: {}
description: |
Free-form additional metadata about this specific file in the set.
Eg, `original_url`. See guide for nomative (but unenforced) schema
fields.
webcapture_entity:
type: object
properties:
<<: *ENTITYPROPS
cdx:
# limit of 200 CDX lines, at least to start?
type: array
items:
$ref: "#/definitions/webcapture_cdx_line"
archive_urls:
type: array
items:
$ref: "#/definitions/webcapture_url"
original_url:
type: string
format: url
example: "http://asheesh.org"
description: "Base URL of the primary resource this is a capture of"
timestamp:
type: string
format: date-time
description: |
Same format as CDX line timestamp (UTC, etc). Corresponds to the
overall capture timestamp. Should generally be the timestamp of
capture of the primary resource URL.
content_scope:
type: string
example: "landing-page"
release_ids:
type: array
items:
<<: *FATCATIDENT
<<: *FATCATIDENTEXAMPLE
description: |
Set of identifier of release entities this fileset represents a full
manifestation of. Usually a single release.
releases:
type: array
items:
$ref: "#/definitions/release_entity"
description: |
Full release entities, included in GET responses when `releases`
included in `expand` parameter. Ignored if included in PUT or POST
requests.
webcapture_cdx_line:
type: object
required:
- surt
- timestamp
- url
- sha1
properties:
surt:
type: string
example: "org,asheesh)/apus/ch1/node15.html"
description: |
"Sortable URL" format. See guide for details.
timestamp:
type: string
format: date-time
example: "2016-09-19T17:20:24Z"
description: |
Date and time of capture, in ISO format. UTC, 'Z'-terminated, second
(or better) precision.
url:
type: string
# NOTE: not format:url to allow alternatives
example: "http://www.asheesh.org:80/APUS/ch1/node15.html"
description: |
Full URL/URI of resource captured.
mimetype:
type: string
example: "text/html"
description: |
Mimetype of the resource at this URL. May be the Content-Type header,
or the actually sniffed file type.
status_code:
type: integer
example: 200
format: int64
description: |
HTTP status code. Should generally be 200, especially for the primary
resource, but may be 3xx (redirect) or even error codes if embedded
resources can not be fetched successfully.
size:
type: integer
example: 1048576
format: int64
description: "Resource (file) size in bytes"
sha1:
<<: *FATCATSHA1
<<: *FATCATSHA1EXAMPLE
sha256:
<<: *FATCATSHA256
<<: *FATCATSHA256EXAMPLE
webcapture_url:
type: object
required:
- url
- rel
properties:
url:
type: string
format: url
example: "https://web.archive.org/web/"
description: |
URL/URI pointing to archive of this web resource.
rel:
type: string
example: "wayback"
description: |
Type of archive endpoint. Usually `wayback` (WBM replay of primary
resource), or `warc` (direct URL to a WARC file containing all
resources of the capture). See guide for full list.
release_entity:
type: object
# required for creation: title
required:
- ext_ids
properties:
<<: *ENTITYPROPS
title:
type: string
description: |
Required for valid entities. The title used in citations and for
display. Sometimes the English translation of title e even if release
content is not English.
subtitle:
type: string
description: |
Subtitle of release. In many cases, better to merge with title than
include as separate field (unless combined title would be very long).
See guide for details.
original_title:
type: string
description: |
Title in original language if `title` field has been translated. See
guide for details.
work_id:
type: string
example: "q3nouwy3nnbsvo3h5klxsx4a7y"
description: |
Identifier of work this release is part of. In creation (POST)
requests, a work entity will be created automatically if this field
is not set.
container:
$ref: "#/definitions/container_entity"
description: |
Complete container entity identified by `container_id` field. Only
included in GET responses when `container` included in `expand`
parameter; ignored in PUT or POST requests.
files:
type: array
items:
$ref: "#/definitions/file_entity"
description: |
Complete file entities identified by `file_ids` field. Only
included in GET responses when `files` included in `expand` parameter;
ignored in PUT or POST requests.
filesets:
type: array
items:
$ref: "#/definitions/fileset_entity"
description: |
Complete file entities identified by `filesets_ids` field. Only
included in GET responses when `filesets` included in `expand`
parameter; ignored in PUT or POST requests.
webcaptures:
type: array
items:
$ref: "#/definitions/webcapture_entity"
description: |
Complete webcapture entities identified by `webcapture_ids` field.
Only included in GET responses when `webcaptures` included in `expand`
parameter; ignored in PUT or POST requests.
container_id:
type: string
example: "q3nouwy3nnbsvo3h5klxsx4a7y"
description: |
Used to link this release to a container entity that the release was
published as part of.
release_type:
type: string
example: "book"
description: |
"Type" or "medium" that this release is published as. See guide for
valid values.
release_stage:
type: string
example: "preprint"
description: |
The stage of publication of this specific release. See guide for
valid values and semantics.
release_date:
type: string
format: date
description: |
Full date when this release was formally published. ISO format, like
`2019-03-05`. See guide for semantics.
release_year:
type: integer
example: 2014
format: int64
description: |
Year when this release was formally published. Must match
`release_date` if that field is set; this field exists because
sometimes only the year is known.
withdrawn_status:
type: string
example: "retracted"
description: |
Type of withdrawal or retraction of this release, if applicable. If
release has not been withdrawn, should be `null` (aka, not set, not
the string "null" or an empty string).
withdrawn_date:
type: string
format: date
description: |
Full date when this release was formally withdrawn (if applicable).
ISO format, like `release_date`.
withdrawn_year:
type: integer
example: 2014
format: int64
description: |
Year corresponding with `withdrawn_date` like
`release_year`/`release_date`.
ext_ids:
$ref: "#/definitions/release_ext_ids"
description: |
Set of external identifiers for this release.
volume:
type: string
example: "3"
description: |
Volume number of container that this release was published in. Often
corresponds to the "Nth" year of publication, but can be any string.
See guide.
issue:
type: string
example: "12"
description: |
Issue number of volume/container that this release was published in.
Sometimes corresponds to a month number in the year, but can be any
string. See guide.
pages:
type: string
example: "340-345"
description: |
Either a single page number ("first page") or a range of pages
separated by a dash ("-"). See guide for details.
number:
type: string
example: "RFC1337"
description: |
For, eg, technical reports, which are published in series or
assigned some other institutional or container-specific identifier.
version:
type: string
example: "3"
description: |
For, eg, updated technical reports or software packages, where
the version string may be the only field disambiguating between
releases.
publisher:
type: string
example: "Elsevier"
description: |
Name, usually English, of the entity or institution responsible for
publication of this release. Not necessarily the imprint/brand. See
guide.
language:
type: string
example: "en"
description: |
Primary language of the content of the full release. Two-letter
RFC1766/ISO639-1 language code, with some custom
extensions/additions. See guide.
license_slug:
type: string
example: "CC-BY"
description: |
Short string (slug) name of license under which release is openly
published (if applicable).
contribs:
type: array
items:
$ref: "#/definitions/release_contrib"
refs:
type: array
items:
$ref: "#/definitions/release_ref"
abstracts:
type: array
items:
$ref: "#/definitions/release_abstract"
release_ext_ids:
type: object
properties:
doi:
type: string
#format: custom
example: "10.1234/abcde.789"
description: |
Digital Object Identifier (DOI), mostly for published papers and
datasets. Should be registered and resolvable via https://doi.org/
wikidata_qid:
type: string
example: "Q42812"
description: "Wikidata entity QID"
isbn13:
type: string
#format: custom
description: |
ISBN-13, for books. Usually not set for chapters. ISBN-10 should be
converted to ISBN-13.
pmid:
type: string
example: "482132"
description: "PubMed Identifier"
pmcid:
example: "PMC7391"
type: string
description: "PubMed Central Identifier"
core:
example: "9234592"
type: string
#format: custom
description: "CORE (https://core.ac.uk) identifier"
arxiv:
type: string
description: "arXiv (https://arxiv.org) identifier; must include version"
jstor:
type: string
description: "JSTOR work identifier"
ark:
type: string
description: "ARK identifier"
mag:
type: string
description: "Microsoft Academic Graph identifier"
doaj:
type: string
description: "DOAJ article-level identifier"
dblp:
type: string
description: "dblp (https://dblp.uni-trier.de/) paper identifier; eg for conference proceedings"
oai:
type: string
description: "OAI-PMH identifier; only used when an OAI-PMH record is the only authoritative metadata (eg, journal OAI-PMH feeds w/o DOIs)"
hdl:
type: string
description: "Handle identifier. Do not put DOIs in this field"
release_abstract:
type: object
properties:
sha1:
<<: *FATCATSHA1
<<: *FATCATSHA1EXAMPLE
content:
type: string
example: "<jats:p>Some abstract thing goes here</jats:p>"
description: |
Abstract content. May be encoded, as per `mimetype` field, but only
string/text content may be included.
mimetype:
type: string
example: "application/xml+jats"
description: |
Mimetype of abstract contents. `text/plain` is the default if content
isn't encoded.
lang:
type: string
example: "en"
description: |
ISO language code of the abstract. Same semantics as release `language` field.
work_entity:
type: object
properties:
<<: *ENTITYPROPS
entity_history_entry:
type: object
required:
- edit
- editgroup
- changelog_entry
properties:
edit:
$ref: "#/definitions/entity_edit"
editgroup:
$ref: "#/definitions/editgroup"
changelog_entry:
$ref: "#/definitions/changelog_entry"
entity_edit:
type: object
required:
- edit_id
- ident
- editgroup_id
properties:
edit_id:
<<: *FATCATUUID
<<: *FATCATUUIDEXAMPLE
description: |
Unique UUID for this specific edit object.
ident:
<<: *FATCATIDENT
<<: *FATCATIDENTEXAMPLE
description: |
Fatcat identifier of the entity this edit is mutating.
revision:
<<: *FATCATUUID
<<: *FATCATUUIDEXAMPLE
description: |
Entity revision that this edit will set the entity to. May be
`null` in the case of deletions.