Difference between revisions of "Using the COPTR data feed"
Line 27: | Line 27: | ||
|action | |action | ||
|query | |query | ||
− | | | + | | Perform a query [https://www.mediawiki.org/wiki/API:Main_page#The_action action], rather than e.g. adding or editing a page. |
|- | |- | ||
|list | |list | ||
|recentchanges | |recentchanges | ||
− | | | + | | Perform a query on the [https://www.mediawiki.org/wiki/API:Recentchanges 'recent changes' list] (one of [https://www.mediawiki.org/wiki/API:Lists many lists available]. |
|- | |- | ||
|format | |format | ||
Line 46: | Line 46: | ||
|- | |- | ||
|rcprop | |rcprop | ||
− | |title<nowiki>|</nowiki>ids<nowiki>|</nowiki>sizes<nowiki>|</nowiki>flags<nowiki>|</nowiki>user<nowiki>|</nowiki> | + | |title<nowiki>|</nowiki>ids<nowiki>|</nowiki>sizes<nowiki>|</nowiki>flags<nowiki>|</nowiki>user<nowiki>|</nowiki>timestamp |
| | | | ||
|} | |} |
Revision as of 20:38, 12 November 2013
Accessing the COPTR data
Question:
- I'd like to take the data in COPTR and create a funky 3D spinny view that helps people navigate the data and find what they are looking for. Can I do this, and can I host it somewhere else?
Answer:
- Yes, that would be excellent! The COPTR content is made available under a CC-BY-SA license but we ask that if possible you point your users back to this site if they have corrections or new tools to add.
Ways to access the COPTR data
We offer two main channels for accessing the data - the MediaWiki API, and XML dumps of the MediaWiki content.
The COPTR API
As COPTR is based on MediaWiki, you can access the COPTR content via the MediaWiki API. The Official MediaWiki API Documentation is a pretty good starting point, and the endpoint itself is fairly self-documenting. However, to help get you started, here are some examples.
If you want access to information on what has changed recently, just like the Special:RecentChanges RecentChanges page, but in a machine-readable form, you can construct a URL like this:
Breaking down those query parameters, we have:
Parameter | Value | Meaning |
---|---|---|
action | query | Perform a query action, rather than e.g. adding or editing a page. |
list | recentchanges | Perform a query on the 'recent changes' list (one of many lists available. |
format | json | |
rclimit | 500 | |
rctype | new | |
rcprop | title|ids|sizes|flags|user|timestamp |
The COPTR Database Backup Dumps
We also make daily XML dumps available, for backup and re-use purposes. You can find them in the backup-dumps folder,