API to get Total File Count per site

Hi,

Is there an API endpoint to get the total number of files in a site? I can find File Size, Page Count, but not File Count with the site summary report endpoint  - /api/13/systemreports/sitesummaryreport or the site metadata endpoint /api/20/sites/{site id}

Parents
  • Two ways can be done:

    1. Use the Folders Itemcount API endpoint
      Swagger URL: <your instance>/showSwaggerUI.action#/Document%20Resource%20APIs/getAllFoldersDocsDetailsCount
      e.g.

      curl -X 'POST' \
      'xxxxxxxx/.../itemcount \
      -H 'accept: application/json' \
      -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
      -H 'Content-Type: application/json' \
      -d '{ "folderIdCsv":"99999" }'

      Where folder ID 99999 is the site root folder (get site info api)

      This will return all docs and folder count as we have said true to includestructure in query parameters
      {
        "folder": [
          {
            "id": 99999,
            "siteId": 9999,
            "status": 1,
            "fileCount": 8,
            "subFolderCount": 10
          }
        ]
      }


    2. Use File iSheet Metadata

      If you are using File meta-data iSheets, then just create your own iSheet view that will return all records (limit no. of columns to aide performance). Perform iSheet query and read the total record count... equals document count
Reply
  • Two ways can be done:

    1. Use the Folders Itemcount API endpoint
      Swagger URL: <your instance>/showSwaggerUI.action#/Document%20Resource%20APIs/getAllFoldersDocsDetailsCount
      e.g.

      curl -X 'POST' \
      'xxxxxxxx/.../itemcount \
      -H 'accept: application/json' \
      -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
      -H 'Content-Type: application/json' \
      -d '{ "folderIdCsv":"99999" }'

      Where folder ID 99999 is the site root folder (get site info api)

      This will return all docs and folder count as we have said true to includestructure in query parameters
      {
        "folder": [
          {
            "id": 99999,
            "siteId": 9999,
            "status": 1,
            "fileCount": 8,
            "subFolderCount": 10
          }
        ]
      }


    2. Use File iSheet Metadata

      If you are using File meta-data iSheets, then just create your own iSheet view that will return all records (limit no. of columns to aide performance). Perform iSheet query and read the total record count... equals document count
Children
No Data