ulong countSyncedEntries(String rootPath, EnumerationMode enumerationMode)

Opens an iterator on a document and/or folder collection matching the rootPath given as a parameter, but only returns the number of items found.

Therefore, it counts the number of entries in the whole or in a subset of the Indexing corpus for that Connector.

This page discusses:

HTTP method

The method used is:

GET no-cache http://<host>:<port>/papi/4/connectors/<connectorName>/count_synced_entries

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_mode

[URL]

The mode parameter is the string representation of the mode:

  • NOT_RECURSIVE_FOLDERS
  • NOT_RECURSIVE_DOCUMENTS
  • NOT_RECURSIVE_ALL
  • RECURSIVE_DOCUMENTS

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.

No Exception or error message is returned if the rootPath refers to an empty subset of the corpus. If status is OK, the body contains the string representation of the integer value.

Use of iterators with concurrent add and delete operations

  • Add/Delete operations do not impact iterators that are already opened.

  • Added/Deleted documents may not appear immediately in the iterated entries because of asynchronous treatment.