Audit
Analytics
Content
Content - attachments
Content body
Content - children and descendants
Content - macro body
Content comments
Content labels
Content permissions
Content properties
Content restrictions
Content versions
Content watches
Dynamic modules
Experimental
Group
Inline tasks
Label info
Long-running task
Relation
Search
Settings
Space
Space permissions
Space properties
Space settings
Template
Themes
Users

Rate this page:

Content

Get content

GET /wiki/rest/api/content

Returns all content in a Confluence instance.

By default, the following objects are expanded: space, history, version.

Permissions required: Permission to access the Confluence site ('Can use' global permission). Only content that the user has permission to view will be returned.

Connect app scope requiredREAD

OAuth scopes requiredread:content-details:confluence
DEPRECATED OAuth scopesread:confluence-content.summary
Learn more about deprecated scopes

Request

Query parameters
type

string

The type of content to return. For example:

  • page
  • blogpost
Default: page
spaceKey

string

The key of the space to be queried for its content.

title

string

The title of the page to be returned. Required for page type.

status

Array<string>

Filter the results to a set of content based on their status. If set to any, content with any status is returned. Note, the historical status is currently not supported.

Style: form
postingDay

string

The posting date of the blog post to be returned. Required for blogpost type. Format: yyyy-mm-dd.

expand

Array<string>

A multi-value parameter indicating which properties of the content to expand. Maximum sub-expansions allowed is 8.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
trigger

string

If set to viewed, the request will trigger a 'viewed' event for the content. When this event is triggered, the page/blogpost will appear on the 'Recently visited' tab of the user's Confluence dashboard.

Valid values: viewed

orderby

string

Orders the content by a particular field. Specify the field and sort direction for this parameter, as follows: 'fieldpath asc/desc'. For example, 'history.createdDate desc'.

start

integer

The starting index of the returned content.

Default: 0, Minimum: 0, Format: int32
limit

integer

The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.

Default: 25, Minimum: 0, Format: int32

Example

1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content`, {
  headers: {
    'Accept': 'application/json'
  }
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the requested list of content is returned.

Content typeValue
application/json

ContentArray

Create content

POST /wiki/rest/api/content

Creates a new piece of content or publishes an existing draft.

To publish a draft, add the id and status properties to the body of the request. Set the id to the ID of the draft and set the status to 'current'. When the request is sent, a new piece of content will be created and the metadata from the draft will be transferred into it.

By default, the following objects are expanded: space, history, version.

Permissions required: 'Add' permission for the space that the content will be created in, and permission to view the draft if publishing a draft.

Connect app scope requiredWRITE

OAuth scopes requiredread:content-details:confluence, write:content:confluence
DEPRECATED OAuth scopeswrite:confluence-content
Learn more about deprecated scopes

Request

Query parameters
status

string

Filter the returned content by status.

Default: current
expand

Array<string>

A multi-value parameter indicating which properties of the content to expand. Maximum sub-expansions allowed is 8.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
Body parameters
id

string

The ID of the draft content. Required when publishing a draft.

Nullable: true
title

string

Nullable: true, Max length: 255
type Required

string

The type of the new content. Custom content types defined by apps are also supported. eg. 'page', 'blogpost', 'comment' etc.

space

object

The space that the content is being created in.

Nullable: true
status

string

The status of the new content.

Default: current

Valid values: current, deleted, historical, draft

container

object

The container of the content. Required if type is comment or certain types of custom content. If you are trying to create a comment that is a child of another comment, specify the parent comment in the ancestors field, not in this field.

Nullable: true
ancestors

Array<object>

The parent content of the new content. If you are creating a top-level page or comment, this can be left blank. If you are creating a child page, this is where the parent page id goes. If you are creating a child comment, this is where the parent comment id goes. Only one parent content id can be specified.

Nullable: true
body

object

The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. storage.

Note, editor2 format is used by Atlassian only. anonymous_export_view is the same as export_view format but only content viewable by an anonymous user is included.

Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

var bodyData = `{
  "id": "<string>",
  "title": "<string>",
  "type": "<string>",
  "space": {
    "id": 2154,
    "name": "<string>",
    "icon": {
      "path": "<string>",
      "width": 2154,
      "height": 2154,
      "isDefault": true
    },
    "identifiers": {
      "spaceIdentifier": "<string>"
    },
    "description": {
      "plain": {
        "value": "<string>",
        "representation": "plain",
        "embeddedContent": [
          {}
        ]
      },
      "view": {
        "value": "<string>",
        "representation": "plain",
        "embeddedContent": [
          {}
        ]
      },
      "_expandable": {
        "view": "<string>",
        "plain": "<string>"
      }
    },
    "homepage": {
      "id": "<string>",
      "type": "<string>",
      "status": "<string>",
      "title": "<string>",
      "space": {
        "id": 2154,
        "key": "<string>",
        "name": "<string>",
        "icon": {
          "path": "<string>",
          "width": 2154,
          "height": 2154,
          "isDefault": true
        },
        "description": {
          "plain": {
            "value": "<string>",
            "representation": "plain",
            "embeddedContent": [
              {}
            ]
          },
          "view": {
            "value": "<string>",
            "representation": "plain",
            "embeddedContent": [
              {}
            ]
          },
          "_expandable": {
            "view": "<string>",
            "plain": "<string>"
          }
        },
        "type": "<string>",
        "metadata": {
          "labels": {
            "results": [
              {
                "prefix": "<string>",
                "name": "<string>",
                "id": "<string>",
                "label": "<string>"
              }
            ],
            "size": 2154
          },
          "_expandable": {}
        },
        "operations": [
          {
            "operation": "administer",
            "targetType": "<string>"
          }
        ],
        "permissions": [
          {
            "operation": {
              "operation": "administer",
              "targetType": "<string>"
            },
            "anonymousAccess": true,
            "unlicensedAccess": true
          }
        ],
        "status": "<string>",
        "settings": {
          "routeOverrideEnabled": true,
          "_links": {}
        },
        "theme": {
          "themeKey": "<string>"
        },
        "lookAndFeel": {
          "headings": {
            "color": "<string>"
          },
          "links": {
            "color": "<string>"
          },
          "menus": {
            "hoverOrFocus": {
              "backgroundColor": "<string>"
            },
            "color": "<string>"
          },
          "header": {
            "backgroundColor": "<string>",
            "button": {
              "backgroundColor": "<string>",
              "color": "<string>"
            },
            "primaryNavigation": {
              "color": "<string>",
              "hoverOrFocus": {
                "backgroundColor": "<string>",
                "color": "<string>"
              }
            },
            "secondaryNavigation": {
              "color": "<string>",
              "hoverOrFocus": {
                "backgroundColor": "<string>",
                "color": "<string>"
              }
            },
            "search": {
              "backgroundColor": "<string>",
              "color": "<string>"
            }
          },
          "content": {},
          "bordersAndDividers": {
            "color": "<string>"
          }
        },
        "history": {
          "createdDate": "<string>",
          "createdBy": {
            "type": "known"
          }
        },
        "_expandable": {
          "settings": "<string>",
          "metadata": "<string>",
          "operations": "<string>",
          "lookAndFeel": "<string>",
          "permissions": "<string>",
          "icon": "<string>",
          "description": "<string>",
          "theme": "<string>",
          "history": "<string>",
          "homepage": "<string>",
          "identifiers": "<string>"
        },
        "_links": {}
      },
      "history": {
        "latest": true,
        "createdBy": {
          "type": "known"
        },
        "createdDate": "<string>",
        "lastUpdated": {
          "when": "<string>",
          "number": 57,
          "minorEdit": true
        },
        "previousVersion": {
          "when": "<string>",
          "number": 57,
          "minorEdit": true
        },
        "contributors": {
          "publishers": {
            "userKeys": [
              "<string>"
            ]
          }
        },
        "nextVersion": {
          "when": "<string>",
          "number": 57,
          "minorEdit": true
        },
        "_expandable": {
          "lastUpdated": "<string>",
          "previousVersion": "<string>",
          "contributors": "<string>",
          "nextVersion": "<string>"
        },
        "_links": {}
      },
      "version": {
        "by": {
          "type": "known"
        },
        "when": "<string>",
        "friendlyWhen": "<string>",
        "message": "<string>",
        "number": 57,
        "minorEdit": true,
        "collaborators": {
          "userKeys": [
            "<string>"
          ]
        },
        "_expandable": {
          "content": "<string>",
          "collaborators": "<string>"
        },
        "_links": {},
        "contentTypeModified": true,
        "confRev": "<string>",
        "syncRev": "<string>",
        "syncRevSource": "<string>"
      },
      "ancestors": [],
      "operations": [
        {
          "operation": "administer",
          "targetType": "<string>"
        }
      ],
      "children": {
        "attachment": {
          "results": [],
          "size": 2154,
          "_links": {}
        },
        "comment": {
          "results": [],
          "size": 2154,
          "_links": {}
        },
        "page": {
          "results": [],
          "size": 2154,
          "_links": {}
        },
        "_expandable": {
          "attachment": "<string>",
          "comment": "<string>",
          "page": "<string>"
        },
        "_links": {}
      },
      "childTypes": {
        "attachment": {
          "value": true,
          "_links": {}
        },
        "comment": {
          "value": true,
          "_links": {}
        },
        "page": {
          "value": true,
          "_links": {}
        },
        "_expandable": {
          "all": {},
          "attachment": {},
          "comment": {},
          "page": {}
        }
      },
      "descendants": {
        "attachment": {
          "results": [],
          "size": 2154,
          "_links": {}
        },
        "comment": {
          "results": [],
          "size": 2154,
          "_links": {}
        },
        "page": {
          "results": [],
          "size": 2154,
          "_links": {}
        },
        "_expandable": {
          "attachment": "<string>",
          "comment": "<string>",
          "page": "<string>"
        },
        "_links": {}
      },
      "container": {},
      "body": {
        "view": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "export_view": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "styled_view": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "storage": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "wiki": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "editor": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "editor2": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "anonymous_export_view": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "atlas_doc_format": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "dynamic": {
          "value": "<string>",
          "representation": "view",
          "embeddedContent": [
            {}
          ],
          "webresource": {},
          "mediaToken": {
            "collectionIds": [
              "<string>"
            ],
            "contentId": "<string>",
            "expiryDateTime": "<string>",
            "fileIds": [
              "<string>"
            ],
            "token": "<string>"
          },
          "_expandable": {
            "content": "<string>",
            "embeddedContent": "<string>",
            "webresource": "<string>",
            "mediaToken": "<string>"
          },
          "_links": {}
        },
        "_expandable": {
          "editor": "<string>",
          "view": "<string>",
          "export_view": "<string>",
          "styled_view": "<string>",
          "storage": "<string>",
          "editor2": "<string>",
          "anonymous_export_view": "<string>",
          "atlas_doc_format": "<string>",
          "wiki": "<string>",
          "dynamic": "<string>",
          "raw": "<string>"
        }
      },
      "restrictions": {
        "read": {
          "operation": "administer",
          "restrictions": {
            "user": {
              "results": [
                {
                  "type": "known"
                }
              ]
            },
            "group": {
              "results": [
                {
                  "type": "group",
                  "name": "<string>"
                }
              ],
              "start": 2154,
              "limit": 2154,
              "size": 2154
            },
            "_expandable": {
              "user": "<string>",
              "group": "<string>"
            }
          },
          "_expandable": {
            "restrictions": "<string>",
            "content": "<string>"
          },
          "_links": {}
        },
        "update": {
          "operation": "administer",
          "restrictions": {
            "user": {
              "results": [
                {
                  "type": "known"
                }
              ]
            },
            "group": {
              "results": [
                {
                  "type": "group",
                  "name": "<string>"
                }
              ],
              "start": 2154,
              "limit": 2154,
              "size": 2154
            },
            "_expandable": {
              "user": "<string>",
              "group": "<string>"
            }
          },
          "_expandable": {
            "restrictions": "<string>",
            "content": "<string>"
          },
          "_links": {}
        },
        "_expandable": {
          "read": "<string>",
          "update": "<string>"
        },
        "_links": {}
      },
      "metadata": {
        "currentuser": {
          "favourited": {
            "isFavourite": true,
            "favouritedDate": "<string>"
          },
          "lastmodified": {
            "version": {
              "when": "<string>",
              "number": 57,
              "minorEdit": true
            },
            "friendlyLastModified": "<string>"
          },
          "lastcontributed": {
            "status": "<string>",
            "when": "<string>"
          },
          "viewed": {
            "lastSeen": "<string>",
            "friendlyLastSeen": "<string>"
          },
          "scheduled": {},
          "_expandable": {
            "favourited": "<string>",
            "lastmodified": "<string>",
            "lastcontributed": "<string>",
            "viewed": "<string>",
            "scheduled": "<string>"
          }
        },
        "properties": {},
        "frontend": {},
        "labels": {
          "results": [
            {
              "prefix": "<string>",
              "name": "<string>",
              "id": "<string>",
              "label": "<string>"
            }
          ],
          "start": 2154,
          "limit": 2154,
          "size": 2154,
          "_links": {}
        }
      },
      "macroRenderedOutput": {},
      "extensions": {},
      "_expandable": {
        "childTypes": "<string>",
        "container": "<string>",
        "metadata": "<string>",
        "operations": "<string>",
        "children": "<string>",
        "restrictions": "<string>",
        "history": "<string>",
        "ancestors": "<string>",
        "body": "<string>",
        "version": "<string>",
        "descendants": "<string>",
        "space": "<string>",
        "extensions": "<string>",
        "schedulePublishDate": "<string>",
        "macroRenderedOutput": "<string>"
      },
      "_links": {}
    },
    "type": "<string>",
    "metadata": {
      "labels": {
        "results": [
          {
            "prefix": "<string>",
            "name": "<string>",
            "id": "<string>",
            "label": "<string>"
          }
        ],
        "start": 2154,
        "limit": 2154,
        "size": 2154,
        "_links": {}
      },
      "_expandable": {}
    },
    "operations": [
      {
        "operation": "administer",
        "targetType": "<string>"
      }
    ],
    "permissions": [
      {
        "id": 2154,
        "subjects": {
          "user": {
            "results": [
              {
                "type": "known",
                "username": "<string>",
                "userKey": "<string>",
                "accountId": "<string>",
                "accountType": "atlassian",
                "email": "<string>",
                "publicName": "<string>",
                "profilePicture": {
                  "path": "<string>",
                  "width": 2154,
                  "height": 2154,
                  "isDefault": true
                },
                "displayName": "<string>",
                "timeZone": "<string>",
                "isExternalCollaborator": true,
                "externalCollaborator": true,
                "operations": [
                  {
                    "operation": "administer",
                    "targetType": "<string>"
                  }
                ],
                "details": {},
                "personalSpace": {
                  "key": "<string>",
                  "name": "<string>",
                  "type": "<string>",
                  "status": "<string>",
                  "_expandable": {},
                  "_links": {}
                },
                "_expandable": {
                  "operations": "<string>",
                  "details": "<string>",
                  "personalSpace": "<string>"
                },
                "_links": {}
              }
            ],
            "size": 2154,
            "start": 2154,
            "limit": 2154
          },
          "group": {
            "results": [
              {
                "type": "group",
                "name": "<string>",
                "id": "<string>",
                "_links": {}
              }
            ],
            "size": 2154,
            "start": 2154,
            "limit": 2154
          },
          "_expandable": {
            "user": "<string>",
            "group": "<string>"
          }
        },
        "operation": {
          "operation": "administer",
          "targetType": "<string>"
        },
        "anonymousAccess": true,
        "unlicensedAccess": true
      }
    ],
    "status": "<string>",
    "settings": {
      "routeOverrideEnabled": true,
      "editor": {
        "page": "<string>",
        "blogpost": "<string>",
        "default": "<string>"
      },
      "_links": {}
    },
    "theme": {
      "themeKey": "<string>",
      "name": "<string>",
      "description": "<string>",
      "icon": {
        "path": "<string>",
        "width": 2154,
        "height": 2154,
        "isDefault": true
      },
      "_links": {}
    },
    "lookAndFeel": {
      "headings": {
        "color": "<string>"
      },
      "links": {
        "color": "<string>"
      },
      "menus": {
        "hoverOrFocus": {
          "backgroundColor": "<string>"
        },
        "color": "<string>"
      },
      "header": {
        "backgroundColor": "<string>",
        "button": {
          "backgroundColor": "<string>",
          "color": "<string>"
        },
        "primaryNavigation": {
          "color": "<string>",
          "hoverOrFocus": {
            "backgroundColor": "<string>",
            "color": "<string>"
          }
        },
        "secondaryNavigation": {
          "color": "<string>",
          "hoverOrFocus": {
            "backgroundColor": "<string>",
            "color": "<string>"
          }
        },
        "search": {
          "backgroundColor": "<string>",
          "color": "<string>"
        }
      },
      "horizontalHeader": {
        "backgroundColor": "<string>",
        "button": {
          "backgroundColor": "<string>",
          "color": "<string>"
        },
        "primaryNavigation": {
          "highlightColor": "<string>"
        },
        "secondaryNavigation": {
          "color": "<string>",
          "hoverOrFocus": {
            "backgroundColor": "<string>",
            "color": "<string>"
          }
        },
        "search": {
          "backgroundColor": "<string>",
          "color": "<string>"
        }
      },
      "content": {
        "screen": {
          "background": "<string>"
        },
        "container": {
          "background": "<string>",
          "backgroundColor": "<string>",
          "backgroundImage": "<string>",
          "backgroundSize": "<string>",
          "padding": "<string>",
          "borderRadius": "<string>"
        },
        "header": {
          "background": "<string>",
          "backgroundColor": "<string>",
          "backgroundImage": "<string>",
          "backgroundSize": "<string>",
          "padding": "<string>",
          "borderRadius": "<string>"
        },
        "body": {
          "background": "<string>",
          "backgroundColor": "<string>",
          "backgroundImage": "<string>",
          "backgroundSize": "<string>",
          "padding": "<string>",
          "borderRadius": "<string>"
        }
      },
      "bordersAndDividers": {
        "color": "<string>"
      },
      "spaceReference": {}
    },
    "history": {
      "createdDate": "<string>",
      "createdBy": {
        "type": "known",
        "username": "<string>",
        "userKey": "<string>",
        "accountId": "<string>",
        "accountType": "atlassian",
        "email": "<string>",
        "publicName": "<string>",
        "profilePicture": {
          "path": "<string>",
          "width": 2154,
          "height": 2154,
          "isDefault": true
        },
        "displayName": "<string>",
        "timeZone": "<string>",
        "isExternalCollaborator": true,
        "externalCollaborator": true,
        "operations": [
          {
            "operation": "administer",
            "targetType": "<string>"
          }
        ],
        "details": {
          "business": {
            "position": "<string>",
            "department": "<string>",
            "location": "<string>"
          },
          "personal": {
            "phone": "<string>",
            "im": "<string>",
            "website": "<string>",
            "email": "<string>"
          }
        },
        "personalSpace": {
          "id": 2154,
          "key": "<string>",
          "name": "<string>",
          "icon": {
            "path": "<string>",
            "width": 2154,
            "height": 2154,
            "isDefault": true
          },
          "description": {
            "plain": {
              "value": "<string>",
              "representation": "plain",
              "embeddedContent": [
                {}
              ]
            },
            "view": {
              "value": "<string>",
              "representation": "plain",
              "embeddedContent": [
                {}
              ]
            },
            "_expandable": {
              "view": "<string>",
              "plain": "<string>"
            }
          },
          "homepage": {
            "type": "<string>",
            "status": "<string>"
          },
          "type": "<string>",
          "metadata": {
            "labels": {
              "results": [
                {
                  "prefix": "<string>",
                  "name": "<string>",
                  "id": "<string>",
                  "label": "<string>"
                }
              ],
              "size": 2154
            },
            "_expandable": {}
          },
          "operations": [
            {
              "operation": "administer",
              "targetType": "<string>"
            }
          ],
          "permissions": [
            {
              "operation": {
                "operation": "administer",
                "targetType": "<string>"
              },
              "anonymousAccess": true,
              "unlicensedAccess": true
            }
          ],
          "status": "<string>",
          "settings": {
            "routeOverrideEnabled": true,
            "_links": {}
          },
          "theme": {
            "themeKey": "<string>"
          },
          "lookAndFeel": {
            "headings": {
              "color": "<string>"
            },
            "links": {
              "color": "<string>"
            },
            "menus": {
              "hoverOrFocus": {
                "backgroundColor": "<string>"
              },
              "color": "<string>"
            },
            "header": {
              "backgroundColor": "<string>",
              "button": {
                "backgroundColor": "<string>",
                "color": "<string>"
              },
              "primaryNavigation": {
                "color": "<string>",
                "hoverOrFocus": {
                  "backgroundColor": "<string>",
                  "color": "<string>"
                }
              },
              "secondaryNavigation": {
                "color": "<string>",
                "hoverOrFocus": {
                  "backgroundColor": "<string>",
                  "color": "<string>"
                }
              },
              "search": {
                "backgroundColor": "<string>",
                "color": "<string>"
              }
            },
            "content": {},
            "bordersAndDividers": {
              "color": "<string>"
            }
          },
          "history": {
            "createdDate": "<string>"
          },
          "_expandable": {
            "settings": "<string>",
            "metadata": "<string>",
            "operations": "<string>",
            "lookAndFeel": "<string>",
            "permissions": "<string>",
            "icon": "<string>",
            "description": "<string>",
            "theme": "<string>",
            "history": "<string>",
            "homepage": "<string>",
            "identifiers": "<string>"
          },
          "_links": {}
        },
        "_expandable": {
          "operations": "<string>",
          "details": "<string>",
          "personalSpace": "<string>"
        },
        "_links": {}
      }
    },
    "key": "<string>",
    "links": {}
  },
  "status": "current",
  "container": {
    "id": 2154,
    "type": "<string>"
  },
  "ancestors": [
    {
      "id": "<string>"
    }
  ],
  "body": {
    "view": {
      "value": "<string>",
      "representation": "view"
    },
    "export_view": {
      "value": "<string>",
      "representation": "view"
    },
    "styled_view": {
      "value": "<string>",
      "representation": "view"
    },
    "storage": {
      "value": "<string>",
      "representation": "view"
    },
    "editor": {
      "value": "<string>",
      "representation": "view"
    },
    "editor2": {
      "value": "<string>",
      "representation": "view"
    },
    "wiki": {
      "value": "<string>",
      "representation": "view"
    },
    "anonymous_export_view": {
      "value": "<string>",
      "representation": "view"
    },
    "plain": {
      "value": "<string>",
      "representation": "view"
    },
    "atlas_doc_format": {
      "value": "<string>",
      "representation": "view"
    },
    "raw": {
      "value": "<string>",
      "representation": "view"
    }
  }
}`;

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content`, {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: bodyData
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the content is created.

Content typeValue
application/json

Content

Archive pages

Experimental

POST /wiki/rest/api/content/archive

Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/ REST API to get the copy task status.

Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need not belong to the same space.

Permissions required: 'Archive' permission for each of the pages in the corresponding space it belongs to.

Connect app scope requiredWRITE

OAuth scopes requiredread:content.metadata:confluence, write:page:confluence
DEPRECATED OAuth scopeswrite:confluence-content
Learn more about deprecated scopes

Request

Body parameters
pages

Array<object>

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/archive`, {
  method: 'POST',
  headers: {
    'Accept': 'application/json'
  }
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the archive request has been submitted.

Content typeValue
application/json

LongTask

Publish shared draft

PUT /wiki/rest/api/content/blueprint/instance/{draftId}

Publishes a shared draft of a page created from a blueprint.

By default, the following objects are expanded: body.storage, history, space, version, ancestors.

Permissions required: Permission to view the draft and 'Add' permission for the space that the content will be created in.

Connect app scope requiredWRITE

OAuth scopes requiredread:content-details:confluence, write:content:confluence
DEPRECATED OAuth scopeswrite:confluence-content
Learn more about deprecated scopes

Request

Path parameters
draftId Required

string

The ID of the draft page that was created from a blueprint. You can find the draftId in the Confluence application by opening the draft page and checking the page URL.

Query parameters
status

string

The status of the content to be updated, i.e. the draft. This is set to 'draft' by default, so you shouldn't need to specify it.

Default: draft
expand

Array<string>

A multi-value parameter indicating which properties of the content to expand.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
Body parameters
version Required

object

The version for the new content.

title Required

string

The title of the content. If you don't want to change the title, set this to the current title of the draft.

Max length: 255
type Required

string

The type of content. Set this to page.

Valid values: page

status

string

The status of the content. Set this to current or omit it altogether.

Default: current

Valid values: current

space

object

The space for the content.

ancestors

Array<object>

The new ancestor (i.e. parent page) for the content. If you have specified an ancestor, you must also specify a space property in the request body for the space that the ancestor is in.

Note, if you specify more than one ancestor, the last ID in the array will be selected as the parent page for the content.

Nullable: true
Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

var bodyData = `{
  "version": {
    "number": 36
  },
  "title": "<string>",
  "type": "page",
  "status": "current",
  "space": {
    "key": "<string>"
  },
  "ancestors": [
    {
      "id": "<string>"
    }
  ]
}`;

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/blueprint/instance/{draftId}`, {
  method: 'PUT',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: bodyData
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the draft was successfully published.

Content typeValue
application/json

Content

Publish legacy draft

POST /wiki/rest/api/content/blueprint/instance/{draftId}

Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of shared drafts. For now, this method works the same as Publish shared draft.

By default, the following objects are expanded: body.storage, history, space, version, ancestors.

Permissions required: Permission to view the draft and 'Add' permission for the space that the content will be created in.

Connect app scope requiredWRITE

OAuth scopes requiredread:content-details:confluence, write:content:confluence
DEPRECATED OAuth scopeswrite:confluence-content
Learn more about deprecated scopes

Request

Path parameters
draftId Required

string

The ID of the draft page that was created from a blueprint. You can find the draftId in the Confluence application by opening the draft page and checking the page URL.

Query parameters
status

string

The status of the content to be updated, i.e. the draft. This is set to 'draft' by default, so you shouldn't need to specify it.

Default: draft
expand

Array<string>

A multi-value parameter indicating which properties of the content to expand.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
Body parameters
version Required

object

The version for the new content.

title Required

string

The title of the content. If you don't want to change the title, set this to the current title of the draft.

Max length: 255
type Required

string

The type of content. Set this to page.

Valid values: page

status

string

The status of the content. Set this to current or omit it altogether.

Default: current

Valid values: current

space

object

The space for the content.

ancestors

Array<object>

The new ancestor (i.e. parent page) for the content. If you have specified an ancestor, you must also specify a space property in the request body for the space that the ancestor is in.

Note, if you specify more than one ancestor, the last ID in the array will be selected as the parent page for the content.

Nullable: true
Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

var bodyData = `{
  "version": {
    "number": 36
  },
  "title": "<string>",
  "type": "page",
  "status": "current",
  "space": {
    "key": "<string>"
  },
  "ancestors": [
    {
      "id": "<string>"
    }
  ]
}`;

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/blueprint/instance/{draftId}`, {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: bodyData
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the draft was successfully published.

Content typeValue
application/json

Content

Search content by CQL

GET /wiki/rest/api/content/search

Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see: Advanced searching using CQL.

Example initial call:

1
2
/wiki/rest/api/content/search?cql=type=page&limit=25

Example response:

1
2
{
  "results": [
    { ... },
    { ... },
    ...
    { ... }
  ],
  "limit": 25,
  "size": 25,
  ...
  "_links": {
    "base": "<url>",
    "context": "<url>",
    "next": "/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg",
    "self": "<url>"
  }
}

When additional results are available, returns next and prev URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use limit to specify the number of results returned in each call. Example subsequent call (taken from example response):

1
2
/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg

The response to this will have a prev URL similar to the next in the example response.

Permissions required: Permission to access the Confluence site ('Can use' global permission). Only content that the user has permission to view will be returned.

Connect app scope requiredREAD

OAuth scopes requiredread:content-details:confluence
DEPRECATED OAuth scopessearch:confluence
Learn more about deprecated scopes

Request

Query parameters
cql Required

string

The CQL string that is used to find the requested content.

cqlcontext

string

The space, content, and content status to execute the search against. Specify this as an object with the following properties:

  • spaceKey Key of the space to search against. Optional.
  • contentId ID of the content to search against. Optional. Must be in the space spacified by spaceKey.
  • contentStatuses Content statuses to search against. Optional.
expand

Array<string>

A multi-value parameter indicating which properties of the content to expand.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
cursor

string

Pointer to a set of search results, returned as part of the next or prev URL from the previous search call.

limit

integer

The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.

Default: 25, Minimum: 0, Format: int32

Example

1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/search?cql={cql}`, {
  headers: {
    'Accept': 'application/json'
  }
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the requested list of content is returned.

Content typeValue
application/json

ContentArray

Get content by ID

GET /wiki/rest/api/content/{id}

Returns a single piece of content, like a page or a blog post.

By default, the following objects are expanded: space, history, version.

Permissions required: Permission to view the content. If the content is a blog post, 'View' permission for the space is required.

Connect app scope requiredREAD

OAuth scopes requiredread:content-details:confluence
DEPRECATED OAuth scopesread:confluence-content.summary
Learn more about deprecated scopes

Request

Path parameters
id Required

string

Query parameters
status

Array<string>

Filter the results to a set of content based on their status. If set to any, content with any status is returned. Note, the historical status is currently not supported.

Style: form
version

integer

The version number of the content to be returned.

Format: int32
embeddedContentRender

string

The version of embedded content (e.g. attachments) to render.

  • current renders the latest version of the embedded content.
  • version-at-save renders the version of the embedded content at the time of save.
Default: current

Valid values: current, version-at-save

expand

Array<string>

A multi-value parameter indicating which properties of the content to expand. Maximum sub-expansions allowed is 8.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
trigger

string

If set to viewed, the request will trigger a 'viewed' event for the content. When this event is triggered, the page/blogpost will appear on the 'Recently visited' tab of the user's Confluence dashboard.

Valid values: viewed

Example

1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/{id}`, {
  headers: {
    'Accept': 'application/json'
  }
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the requested content is returned.

Content typeValue
application/json

Content

Update content

PUT /wiki/rest/api/content/{id}

Updates a piece of content. Use this method to update the title or body of a piece of content, change the status, change the parent page, and more.

Note, updating draft content is currently not supported.

Permissions required: Permission to update the content.

Connect app scope requiredWRITE

OAuth scopes requiredread:content-details:confluence, write:content:confluence
DEPRECATED OAuth scopeswrite:confluence-content
Learn more about deprecated scopes

Request

Path parameters
id Required

string

The ID of the content to be updated.

Query parameters
status

string

The updated status of the content. Use this parameter to change the status of a piece of content without passing the entire request body.

Default: current

Valid values: current, trashed, deleted, historical, draft

conflictPolicy

string

The action that should be taken when conflicts are discovered. Only used when publishing a draft page.

Default: abort

Valid values: abort

Body parameters
version Required

object

Nullable: true
title

string

The updated title of the content. If you are not changing this field, set this to the current title.

Nullable: true, Max length: 255
type Required

string

The type of content. Set this to the current type of the content. For example, - page - blogpost - comment - attachment

Nullable: true
status

string

The updated status of the content. Note, if you change the status of a page from 'current' to 'draft' and it has an existing draft, the existing draft will be deleted in favor of the updated page.

Valid values: current, trashed, deleted, historical, draft

ancestors

Array<object>

The new parent for the content. Only one parent content 'id' can be specified.

Nullable: true
body

object

Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

var bodyData = `{
  "version": {
    "number": 19
  },
  "title": "<string>",
  "type": "<string>",
  "status": "current",
  "ancestors": [
    {
      "id": 2154
    }
  ],
  "body": {
    "view": {
      "value": "<string>",
      "representation": "view"
    },
    "export_view": {
      "value": "<string>",
      "representation": "view"
    },
    "styled_view": {
      "value": "<string>",
      "representation": "view"
    },
    "storage": {
      "value": "<string>",
      "representation": "storage"
    },
    "editor": {
      "value": "<string>",
      "representation": "view"
    },
    "editor2": {
      "value": "<string>",
      "representation": "view"
    },
    "wiki": {
      "value": "<string>",
      "representation": "view"
    },
    "atlas_doc_format": {
      "value": "<string>",
      "representation": "view"
    },
    "anonymous_export_view": {
      "value": "<string>",
      "representation": "view"
    }
  }
}`;

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/{id}`, {
  method: 'PUT',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: bodyData
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the content is updated.

Content typeValue
application/json

Content

Delete content

DELETE /wiki/rest/api/content/{id}

Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and status:

  • If the content's type is page or blogpost and its status is current, it will be trashed.
  • If the content's type is page or blogpost and its status is trashed, the content will be purged from the trash and deleted permanently. Note, you must also set the status query parameter to trashed in your request.
  • If the content's type is comment or attachment, it will be deleted permanently without being trashed.

Permissions required: 'Delete' permission for the space that the content is in.

Connect app scope requiredDELETE

OAuth scopes requireddelete:content:confluence
DEPRECATED OAuth scopeswrite:confluence-content
Learn more about deprecated scopes

Request

Path parameters
id Required

string

The ID of the content to be deleted.

Query parameters
status

string

Set this to trashed, if the content's status is trashed and you want to purge it.

Example

1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/{id}`, {
  method: 'DELETE'
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());

Responses