void deleteDocumentsRootPath(String rootPath [, Boolean recursive=true] )

Deletes a set of documents (collection) specified by a rootPath. It is possible to only delete documents at the first level of the rootPath (not recursively) by using the recursive flag.

This page discusses:

Data types

The object contains:

Types/flag

Description

rootPath

A part of the URI used to select a subset of the corpus. If the rootPath value is an empty string ("") then the whole collection will be deleted.

Note that the rootPath means that the beginning of the URI must match.

See also URI.

recursive

The recursive flag indicates that the deletion also impacts subfolders.

HTTP method

The method used is:

POST http://<host>:<port>/papi/4/connectors/<connectorName>/delete_documents_root_path

HTTP parameters

The parameters are described in the table below.

Parameter

Location

Description

PAPI_rootPath

[URL]

The rootPath parameter is the string representation of the rootPath. It can take the form:

/root/subdir1/subdir2/subdir3/subdir3/...

PAPI_recursive

[URL]

A boolean representation of the flag: 'true' for true, 'false' for false.

PAPI_session

[URL]

The optional parameter that retrieves the session given by a previous call to get_current_session_id

Action: if there is a session mismatch, the Push API server refuses the command and returns an exception.

HTTP response

The command uses the standard HTTP responses. See HTTP command response.

However, no Exception or error message is returned if the rootPath refers to an empty (inexistant) subset of the corpus.