Extension:Cargo/Exporting data

You can export the data contained in Cargo to use by other systems. There are various ways to do it: via display formats, via the API, and through direct SQL querying.

Export display formats
Queries in Cargo include two display formats that can be used for exporting data: "csv" and "json". If you set one of these as the display format, you will simply see a link as the query result. Clicking on that link will bring you to a URL (at the page Special:CargoExport) that holds that structured data. Any outside system can directly access that URL.

The "csv" format has one optional parameter: "delimiter", which sets the separator between values; by default it is a comma.

The "json" format has no parameters.

API
Cargo defines the "cargoquery" MediaWiki API action, which lets you call the equivalent of #cargo_query from an outside the wiki, returning the results in MediaWiki-specific JSON and XML formats. To see its usage syntax, search for "action=cargoquery" here.

Database querying
Finally, because Cargo stores its data in fairly simple database tables, you should be able to have other systems directly query its data using SQL, provided of course that they have access to that database. You can see an explanation of Cargo's data storage, including some special fields and tables, at Database storage details.