deletePageTree method

Future<LongTask> deletePageTree(
  1. String id
)

Moves a pagetree rooted at a page to the space's trash:

  • If the content's type is page and its status is current, it will be trashed including all its descendants.
  • For every other combination of content type and status, this API is not supported.

This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously.

Response example:

`
 {
      "id" : "1180606",
      "links" : {
           "status" : "/rest/api/longtask/1180606"
      }
 }
 `

Use the /longtask/<taskId> REST API to get the copy task status.

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

Implementation

Future<LongTask> deletePageTree(String id) async {
  return LongTask.fromJson(await _client.send(
    'delete',
    'wiki/rest/api/content/{id}/pageTree',
    pathParameters: {
      'id': id,
    },
  ));
}