Download module usage as CSV
One ModuleUsage per module the reader may see in some language, at ?ref=, from the module index: how many manuals include it (directly or through module references) and how many modules refer to it, with meta.usedIn. Only manuals and modules the reader may see are named or counted, and a manual counts through module references only where the reader may see every module on the way. A module file that cannot be read is left out. A download (Content-Disposition: attachment, nosniff): CSV (RFC 4180, a header row, lines ending in CRLF; a value a spreadsheet would run as a formula starts with '). The whole report, unpaged; X-Ccms-Rows says how many rows follow the header. Columns: module, title, type, deprecated, languages, manuals, modules, used in manuals, used in modules; the manuals and modules using a module are their IDs, one per line in their cell, all of them. Sorted as sort says: Comma-separated fields (id, title, type, manuals, modules, usage; manuals and modules are the use counts, usage their sum), each --prefixed for descending, each at most once; ties by title, then ID. Default: title. Needs content.read.draft (in any scope), on top of reading content (content.read); what it names and counts is limited by the reader’s scope, its languages included.
bearerAuthorizationBearer <JWT>A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.
filter[unused]?stringtrue: only modules no manual includes, directly or through module references (a module only other modules refer to is unused if none of them is in a manual); false: only modules some manual includes.
"true""false"filter[type]?stringOnly modules of this module type; one the configuration does not know matches nothing.
^[a-z][a-z0-9-]*$length <= 64sort*stringref?stringBranch, tag or commit ID to read from. Default: the server's CCMS_DEFAULT_REF.
X-Ccms-User?stringDemo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).
The CSV file.
response?stringtext/csvcurl -X GET 'http://localhost:3000/reports/module-usage/csv?sort=string'"string"