OpenFolia

Download module usage as CSV

GET
/reports/module-usage/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.

Authorization

bearer
headerAuthorizationBearer <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.

Query Parameters

filter[unused]?string

true: 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.

Value in"true""false"
filter[type]?string

Only modules of this module type; one the configuration does not know matches nothing.

Match^[a-z][a-z0-9-]*$
Lengthlength <= 64
sort*string
ref?string

Branch, tag or commit ID to read from. Default: the server's CCMS_DEFAULT_REF.

Header Parameters

X-Ccms-User?string

Demo 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).

Response Body

The CSV file.

response?stringtext/csv
Example Request
curl -X GET 'http://localhost:3000/reports/module-usage/csv?sort=string'
Example Response
"string"