Help:Web Services

From EcoliWiki
Jump to: navigation, search

EcoliWiki web services are designed to help monitor the content of EcoliWiki without having to log in

Recent changes RSS feed

EcoliWiki has the standard mediawiki Recent Changes rss and atom feeds. How useful these are is not clear.

http://ecoliwiki.net/colipedia/index.php?title=Special:RecentChanges&feed=rss

keywordsearch2.php

http://ecoliwiki.net/rest/keywordsearch2.php?keyword=mutS

is_edited.php

The is_edited service allows remote sites to monitor whether a page on the wiki has been revised by a user. It excludes bot edits.

parameters

  • send an identifier or a page title
    • id: takes a GO id as GO:xxxxx (optional)
    • page: the title of a page in the GONUTS wiki. Page queries use SQL LIKE to find matches in the page title (See example).
    • exclude (optional) excludes entries where the number of revisions is <= excluded.
    You should only send id OR page. If you pass both id and page, the service should still work, but it may decide which to return based on the order in which it sees the parameters.
  • date: a date in the format YYYYMMDD
  • help: redirect to this page. Passing a help parameter overrides any other parts of the query and redirects here

A valid query uses either id or page. The date parameter is optional.

examples

Query a page or group of pages

http://ecoliwiki.net/rest/is_edited.php?page=lacZ:Gene

Returns revision data for the lacZ:Gene page in EcoliWiki: <xml><?xml version="1.0" encoding="UTF-8"?>

<message status="ok" description="normal">
<metadata>
  <provider_name>EcoliWiki</provider_name>
  <service_name>wiki_revisions</service_name>
  <query>page=lacZ:Gene</query>
  <elapsed_time>0.04</elapsed_time>
</metadata>
<revision_data>
  <url>http://ecoliwiki.net/colipedia/index.php/lacZ:Gene</url>
  <page_title>lacZ:Gene</page_title>
     <revisions>
        <total>3</total>
        <last>20100217 05:39:25Z</last>
        <after/>
     </revisions>
  </revision_data>
</message></xml>

You can use % as a wildcard:

http://ecoliwiki.net/rest/is_edited.php?page=lacZ:%

Query pages annotated to a GO id

http://ecoliwiki.net/rest/is_edited.php?id=GO:0030337&date=20080301

Returns <xml> <?xml version="1.0" encoding="UTF-8"?> <message status="ok" description="normal"> <metadata>

  <provider_name>EcoliWiki</provider_name>
  <service_name>wiki_revisions</service_name>
  <query>id=GO:0030337&date=20080301</query>
  <elapsed_time>0.02</elapsed_time>

</metadata> <revision_data>

  <url>http://ecoliwiki.net/colipedia/index.php/dnaN:Gene_Product(s)</url>
  <page_title>dnaN:Gene_Product(s)</page_title>
  <revisions>
     <total>5</total>
     <last>20090929 19:02:31Z</last>
     <after>
        <date>20080301</date>
        <count>5</count>
     </after>
  </revisions>

</revision_data> <revision_data>

  <url>http://ecoliwiki.net/colipedia/index.php/dnaX:Gene_Product(s)</url>
  <page_title>dnaX:Gene_Product(s)</page_title>
  <revisions>
     <total>13</total>
     <last>20100304 17:11:01Z</last>
     <after>
        <date>20080301</date>
        <count>13</count>
     </after>
  </revisions>

</revision_data> </message> </xml>