@@ -503,17 +503,19 @@ See below for more information.
503
503
504
504
To create a document with a single file you have to send a `POST` request to `/documents` with the `content` as body.
505
505
506
- | Header | Type | Description |
507
- |---------------------|--------|---------------------------------------|
508
- | Content-Disposition | string | The form & file name of the document. |
509
- | Content-Type? | string | The content type of the document. |
510
- | Language? | string | The language of the document. |
511
-
512
- | Query Parameter | Type | Description |
513
- |-----------------|------------------------------|----------------------------------------------|
514
- | language? | [language](#language-enum) | The language of the document. |
515
- | formatter? | [formatter](#formatter-enum) | With which formatter to render the document. |
516
- | style? | style name | Which style to use for the formatter |
506
+ | Header | Type | Description |
507
+ |---------------------|-----------|---------------------------------------------------------|
508
+ | Content-Disposition | string | The form & file name of the document. |
509
+ | Content-Type? | string | The content type of the document. |
510
+ | Language? | string | The language of the document. |
511
+ | Expires-At? | Timestamp | When the document file should expire in RFC 3339 format |
512
+
513
+ | Query Parameter | Type | Description |
514
+ |-----------------|------------------------------|---------------------------------------------------------|
515
+ | language? | [language](#language-enum) | The language of the document. |
516
+ | formatter? | [formatter](#formatter-enum) | With which formatter to render the document. |
517
+ | style? | style name | Which style to use for the formatter |
518
+ | expires_at? | Timestamp | When the document file should expire in RFC 3339 format |
517
519
518
520
<details>
519
521
<summary>Example</summary>
@@ -540,11 +542,12 @@ second `file-1` and so on.
540
542
| formatter? | [formatter](#formatter-enum) | With which formatter to render the document. |
541
543
| style? | style name | Which style to use for the formatter |
542
544
543
- | Part Header | Type | Description |
544
- |---------------------|--------|--------------------------------------------|
545
- | Content-Disposition | string | The form & file name of the document. |
546
- | Content-Type? | string | The content type/language of the document. |
547
- | Language? | string | The language of the document. |
545
+ | Part Header | Type | Description |
546
+ |---------------------|-----------|---------------------------------------------------------|
547
+ | Content-Disposition | string | The form & file name of the document. |
548
+ | Content-Type? | string | The content type/language of the document. |
549
+ | Language? | string | The language of the document. |
550
+ | Expires-At? | Timestamp | When the document file should expire in RFC 3339 format |
548
551
549
552
<details>
550
553
<summary>Example</summary>
@@ -584,14 +587,16 @@ update the document.
584
587
"content": "package main\n\n func main() {\n println(\" Hello World!\" )\n }",
585
588
// only if formatter is set
586
589
"formatted": "...",
587
- "language": "Go"
590
+ "language": "Go",
591
+ "expires_at": null
588
592
},
589
593
{
590
594
"name": "untitled1",
591
595
"content": "Hello World!",
592
596
// only if formatter is set
593
597
"formatted": "...",
594
- "language": "plaintext"
598
+ "language": "plaintext",
599
+ "expires_at": null
595
600
}
596
601
],
597
602
"token": "kiczgez33j7qkvqdg9f7ksrd8jk88wba"
@@ -623,14 +628,16 @@ The response will be a `200 OK` with the document content as `application/json`
623
628
"content": "package main\n\n func main() {\n println(\" Hello World!\" )\n }",
624
629
// only if formatter is set
625
630
"formatted": "...",
626
- "language": "Go"
631
+ "language": "Go",
632
+ "expires_at": null
627
633
},
628
634
{
629
635
"name": "untitled1",
630
636
"content": "Hello World!",
631
637
// only if formatter is set
632
638
"formatted": "...",
633
- "language": "plaintext"
639
+ "language": "plaintext",
640
+ "expires_at": null
634
641
}
635
642
]
636
643
}
@@ -659,7 +666,8 @@ The response will be a `200 OK` with the document content as `application/json`
659
666
"content": "package main\n\n func main() {\n println(\" Hello World!\" )\n }",
660
667
// only if formatter is set
661
668
"formatted": "...",
662
- "language": "Go"
669
+ "language": "Go",
670
+ "expires_at": null
663
671
}
664
672
` ` `
665
673
@@ -689,15 +697,17 @@ The response will be a `200 OK` with the document content as `application/json`
689
697
"content": "package main\n\n func main() {\n println(\" Hello World!\" )\n }",
690
698
// only if formatter is set
691
699
"formatted": "...",
692
- "language": "Go"
700
+ "language": "Go",
701
+ "expires_at": null
693
702
},
694
703
{
695
704
"name": "untitled1",
696
705
// only if withContent is set
697
706
"content": "Hello World!",
698
707
// only if formatter is set
699
708
"formatted": "...",
700
- "language": "plaintext"
709
+ "language": "plaintext",
710
+ "expires_at": null
701
711
}
702
712
]
703
713
},
@@ -710,14 +720,16 @@ The response will be a `200 OK` with the document content as `application/json`
710
720
"content": "package main\n\n func main() {\n println(\" Hello!\" )\n }",
711
721
// only if formatter is set
712
722
"formatted": "...",
713
- "language": "Go"
723
+ "language": "Go",
724
+ "expires_at": null
714
725
},
715
726
{
716
727
"name": "untitled1",
717
728
"content": "Hello!",
718
729
// only if formatter is set
719
730
"formatted": "...",
720
- "language": "plaintext"
731
+ "language": "plaintext",
732
+ "expires_at": null
721
733
}
722
734
]
723
735
}
@@ -738,18 +750,20 @@ as `multipart/form-data`. See below for more information.
738
750
To create a document with a single file you have to send a `PATCH` request to `/documents/{key}` with the `content` as
739
751
body.
740
752
741
- | Header | Type | Description |
742
- |---------------------|--------|-----------------------------------------------------------|
743
- | Content-Disposition | string | The form & file name of the document. |
744
- | Content-Type? | string | The content type of the document. |
745
- | Language? | string | The language of the document. |
746
- | Authorization? | string | The update token of the document. (prefix with `Bearer `) |
747
-
748
- | Query Parameter | Type | Description |
749
- |-----------------|------------------------------|----------------------------------------------|
750
- | language? | [language](#language-enum) | The language of the document. |
751
- | formatter? | [formatter](#formatter-enum) | With which formatter to render the document. |
752
- | style? | style name | Which style to use for the formatter |
753
+ | Header | Type | Description |
754
+ |---------------------|-----------|-----------------------------------------------------------|
755
+ | Content-Disposition | string | The form & file name of the document. |
756
+ | Content-Type? | string | The content type of the document. |
757
+ | Language? | string | The language of the document. |
758
+ | Authorization? | string | The update token of the document. (prefix with `Bearer `) |
759
+ | Expires-At? | Timestamp | When the document file should expire in RFC 3339 format |
760
+
761
+ | Query Parameter | Type | Description |
762
+ |-----------------|------------------------------|---------------------------------------------------------|
763
+ | language? | [language](#language-enum) | The language of the document. |
764
+ | formatter? | [formatter](#formatter-enum) | With which formatter to render the document. |
765
+ | style? | style name | Which style to use for the formatter |
766
+ | expires_at? | Timestamp | When the document file should expire in RFC 3339 format |
753
767
754
768
<details>
755
769
<summary>Example</summary>
@@ -780,11 +794,12 @@ second `file-1` and so on.
780
794
| formatter? | [formatter](#formatter-enum) | With which formatter to render the document. |
781
795
| style? | style name | Which style to use for the formatter |
782
796
783
- | Part Header | Type | Description |
784
- |---------------------|--------|---------------------------------------|
785
- | Content-Disposition | string | The form & file name of the document. |
786
- | Content-Type? | string | The content type of the document. |
787
- | Language? | string | The language of the document. |
797
+ | Part Header | Type | Description |
798
+ |---------------------|-----------|---------------------------------------------------------|
799
+ | Content-Disposition | string | The form & file name of the document. |
800
+ | Content-Type? | string | The content type of the document. |
801
+ | Language? | string | The language of the document. |
802
+ | Expires-At? | Timestamp | When the document file should expire in RFC 3339 format |
788
803
789
804
<details>
790
805
<summary>Example</summary>
@@ -822,14 +837,16 @@ update the document.
822
837
"content": "package main\n\n func main() {\n println(\" Hello World Updated!\" )\n }",
823
838
// only if formatter is set
824
839
"formatted": "...",
825
- "language": "Go"
840
+ "language": "Go",
841
+ "expires_at": null
826
842
},
827
843
{
828
844
"name": "untitled1",
829
845
"content": "Hello World Updated!",
830
846
// only if formatter is set
831
847
"formatted": "...",
832
- "language": "plaintext"
848
+ "language": "plaintext",
849
+ "expires_at": null
833
850
}
834
851
],
835
852
"token": "kiczgez33j7qkvqdg9f7ksrd8jk88wba"
@@ -875,14 +892,16 @@ the document.
875
892
" content" : " package main\n\n func main() {\n println(\" Hello World Updated!\" )\n }" ,
876
893
// only if formatter is set
877
894
" formatted" : " ..." ,
878
- " language" : " Go"
895
+ " language" : " Go" ,
896
+ " expires_at" : null
879
897
},
880
898
{
881
899
" name" : " untitled1" ,
882
900
" content" : " Hello World Updated!" ,
883
901
// only if formatter is set
884
902
" formatted" : " ..." ,
885
- " language" : " plaintext"
903
+ " language" : " plaintext" ,
904
+ " expires_at" : null
886
905
}
887
906
]
888
907
}
@@ -965,6 +984,7 @@ following JSON body:
965
984
" name" : " main.go" ,
966
985
" content" : " package main\n\n func main() {\n println(\" Hello World Updated!\" )\n }" ,
967
986
" language" : " Go" ,
987
+ " expires_at" : null
968
988
}
969
989
]
970
990
}
@@ -1116,10 +1136,6 @@ A successful request will return a `204 No Content` response with an empty body.
1116
1136
for ` GET /documents/{key} ` .
1117
1137
- ` GET ` /` HEAD ` ` /{key}/{version}/preview ` - Get the preview of a document version, query parameters are the same as
1118
1138
for ` GET /documents/{key}/versions/{version} ` .
1119
- - ` GET ` /` HEAD ` ` /documents/{key}/preview ` - Get the preview of a document, query parameters are the same as
1120
- for ` GET /documents/{key} ` .
1121
- - ` GET ` /` HEAD ` ` /documents/{key}/versions/{version}/preview ` - Get the preview of a document version, query parameters
1122
- are the same as for ` GET /documents/{key}/versions/{version} ` .
1123
1139
- ` GET ` /` HEAD ` ` /raw/{key} ` - Get the raw content of a document, query parameters are the same as
1124
1140
for ` GET /documents/{key} ` .
1125
1141
- ` GET ` /` HEAD ` ` /raw/{key}/files/{filename} ` - Get the raw content of a document file, query parameters are the same as
0 commit comments