Back to the list of all defined endpoints
This endpoint provides aggregated statistics about the number of items per collection according to selected filters.
NOTE: This is currently a beta feature.
GET /api/contentreport/filteredcollections
The endpoint takes a filters query parameter whose value is a comma-separated list of filters
like the following:
?filters=is_discoverable,has_multiple_originals,has_pdf_original
Alternatively, the comma-separated list can be replaced by a repetition of the filters parameter
for each requested filter:
?filters=is_discoverable&filter=has_multiple_originals&filter=has_pdf_original
Please see below for the list of available filters.
For each collection, the basic report consists of:
- name (label) and handle of the collection
- name (label) and handle of the parent community
- total number of items
- number of items matching all selected filters
In addition, a summary element provides the total number of items and the total number of items matching all filters
for the whole repository.
An example JSON response document to /api/contentreport/filteredcollections:
{
"id": "filteredcollections",
"collections": [
{
"label": "Collection 1",
"handle": "100/1",
"values": {
"is_discoverable": 23,
"has_multiple_originals": 3,
"has_pdf_original": 14
},
"community_label": "Community 1",
"community_handle": "20.500.11794/1",
"nb_total_items": 23,
"all_filters_value": 3
},
{
"label": "Collection 2",
"handle": "100/2",
"values": {
"is_discoverable": 1,
"has_multiple_originals": 0,
"has_pdf_original": 0
},
"community_label": "Community 1",
"community_handle": "20.500.11794/1",
"nb_total_items": 1,
"all_filters_value": 0
},
{
"label": "Collection 3",
"handle": "100/3",
"values": {
"is_discoverable": 1,
"has_multiple_originals": 0,
"has_pdf_original": 1
},
"community_label": "Community 1",
"community_handle": "20.500.11794/1",
"nb_total_items": 1,
"all_filters_value": 0
}
],
"summary": {
"label": null,
"handle": null,
"values": {
"is_discoverable": 25,
"has_multiple_originals": 3,
"has_pdf_original": 15
},
"community_label": null,
"community_handle": null,
"nb_total_items": 25,
"all_filters_value": 3
},
"type": "filtered-collections",
"_links": {
"self": {
"href": "http://localhost:8080/dspace-server/api/contentreport/filtered-collections"
}
}
}The available filters are as follows:
- Item Property Filters
is_item: Is Item - always trueis_withdrawn: Withdrawn Itemsis_not_withdrawn: Available Items - Not Withdrawnis_discoverable: Discoverable Items - Not Privateis_not_discoverable: Not Discoverable - Private Item
- Basic Bitstream Filters
has_multiple_originals: Item has Multiple Original Bitstreamshas_no_originals: Item has No Original Bitstreamshas_one_original: Item has One Original Bitstream
- Bitstream Filters by MIME Type
has_doc_original: Item has a Doc Original Bitstream (PDF, Office, Text, HTML, XML, etc)has_image_original: Item has an Image Original Bitstreamhas_unsupp_type: Has Other Bitstream Types (not Doc or Image)has_mixed_original: Item has multiple types of Original Bitstreams (Doc, Image, Other)has_pdf_original: Item has a PDF Original Bitstreamhas_jpg_original: Item has JPG Original Bitstreamhas_small_pdf: Has unusually small PDFhas_large_pdf: Has unusually large PDFhas_doc_without_text: Has document bitstream without TEXT item
- Supported MIME Type Filters
has_only_supp_image_type: Item Image Bitstreams are Supportedhas_unsupp_image_type: Item has Image Bitstream that is Unsupportedhas_only_supp_doc_type: Item Document Bitstreams are Supportedhas_unsupp_doc_type: Item has Document Bitstream that is Unsupported
- Bitstream Bundle Filters
has_unsupported_bundle: Has bitstream in an unsupported bundlehas_small_thumbnail: Has unusually small thumbnailhas_original_without_thumbnail: Has original bitstream without thumbnailhas_invalid_thumbnail_name: Has invalid thumbnail name (assumes one thumbnail for each original)has_non_generated_thumb: Has non-generated thumbnailno_license: Doesn't have a licensehas_license_documentation: Has documentation in the license bundle
- Permission Filters
has_restricted_original: Item has Restricted Original Bitstreamhas_restricted_thumbnail: Item has Restricted Thumbnailhas_restricted_metadata: Item has Restricted Metadata
Possible response status:
- 200 OK - The specific report data was found, and the data has been properly returned.
- 403 Forbidden - In case of unauthorized user session.