Editing Using the COPTR data feed
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 12: | Line 12: | ||
== The COPTR API == | == The COPTR API == | ||
− | As COPTR is based on MediaWiki, you can access the COPTR content via the MediaWiki API. The [https://www.mediawiki.org/wiki/API:Main_page Official MediaWiki API Documentation] is a pretty good starting point, and [http:// | + | As COPTR is based on MediaWiki, you can access the COPTR content via the MediaWiki API. The [https://www.mediawiki.org/wiki/API:Main_page Official MediaWiki API Documentation] is a pretty good starting point, and [http://wiki-dev.openplanetsfoundation.org/api.php the endpoint itself is ''fairly'' self-documenting]. However, to help get you started, here is an example. |
=== Machine-Readable Recent Changes === | === Machine-Readable Recent Changes === | ||
Line 18: | Line 18: | ||
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: | 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: | ||
− | + | http://wiki-dev.openplanetsfoundation.org/api.php?action=query&list=recentchanges&format=json&rclimit=500&rctype=new&rcprop=title%7Cids%7Csizes%7Cflags%7Cuser%7Ctimestamp | |
Breaking down those query parameters, we have: | Breaking down those query parameters, we have: | ||
− | {| class="wikitable" style=" | + | {| class="wikitable" style="text-align: center;" |
! Parameter | ! Parameter | ||
! Value | ! Value | ||
Line 33: | Line 33: | ||
|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] | + | | 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 52: | Line 52: | ||
|} | |} | ||
− | So, for example, if you would rather receive XML, you can just modify [http:// | + | So, for example, if you would rather receive XML, you can just modify [http://wiki-dev.openplanetsfoundation.org/api.php?action=query&list=recentchanges&format=xml&rclimit=500&rctype=new&rcprop=title%7Cids%7Csizes%7Cflags%7Cuser%7Ctimestamp the format parameter]. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== The COPTR Database Backup Dumps == | == The COPTR Database Backup Dumps == | ||
− | We also make daily XML dumps available, for backup and re-use purposes. You can find them in the [http:// | + | We also make daily XML dumps available, for backup and re-use purposes. You can find them in the [http://wiki-dev.openplanetsfoundation.org/backup-dumps/ backup-dumps] folder, |