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 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: | |
− | + | 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: | ||
− | {| | + | {| |
! Parameter | ! Parameter | ||
! Value | ! Value | ||
Line 33: | Line 31: | ||
|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 | ||
|json | |json | ||
− | | Return the | + | | Return the results in JSON format |
|- | |- | ||
|rclimit | |rclimit | ||
Line 51: | Line 49: | ||
| For each event, return these fields (see the [https://www.mediawiki.org/wiki/API:Recentchanges API docs] for more detail). | | For each event, return these fields (see the [https://www.mediawiki.org/wiki/API:Recentchanges API docs] for more detail). | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== 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, |