Skip to main content
MindTouch Success Center

pages/{pageid}/feed (GET) (MT4)

Overview

Retrieve feed of page changes

  • REST Method: GET
  • Method Access: public

Uri Parameters

Name Type Description
pageid string either an integer page ID, "home", or "=" followed by a double uri-encoded page title

Query Parameters

Name Type Description
includeDeleted bool? Include deleted pages in the authorization. Default is false
timezone string? Optionally indicate a timezone so that the news feed displays the messages with the timestamp adjusted to the preferred timezone (e.g. -09:00, the default is empty)
authenticate bool? Force authentication for request (default: false)
redirects int? If zero, do not follow page redirects.
filter string? use "new" to include only newly created pages in the feed (default: all)
depth string? How deep into the sub-tree changes should be included. 0 for the current page only, 'infinity' for entire sub-tree (default: 0)
format {all, daily, raw, rawdaily}? Format for feed (default: daily)
offset int? Skipped changes (default: 0)
limit int? Number of changes to retrieve (default: 100)
since string? Start date for changes. Date is provided in 'yyyyMMddHHmmss' format (default: ignored).

Return Codes

Name Value Description
OK 200 The request completed successfully
Bad Request 400 Invalid input parameter or request body
Forbidden 403 Read/suscribe access to the page is required
Not Found 404 Requested page could not be found

Message Format

Output (Atom):  Refer to http://www.w3.org/2005/Atom

Output (Digest/Raw):

<digest>
    <change>
        <rc_id>{int}</rc_id> 
        <rc_comment>{text}</rc_comment> 
        <rc_cur_id>{int}</rc_cur_id> 
        <rc_last_oldid>{int}</rc_last_oldid> 
        <rc_namespace>{int}</rc_namespace> 
        <rc_timestamp>{date}</rc_timestamp> 
        <rc_title>{text}</rc_title> 
        <rc_type>{int}</rc_type> 
        <rc_moved_to_ns>{int}</rc_moved_to_ns> 
        <rc_moved_to_title>{text}</rc_moved_to_title> 
        <rc_user_name>{text}</rc_user_name> 
        <rc_watched>{int}</rc_watched> 
        <rc_page_exists>{int}</rc_page_exists> 
        <edit_count>{int}</edit_count> 
     </change>
    ...
</digest>

Implementation Notes

Atom and Digest formats retrieve a compressed summary of page changes, whereas the Raw format lists each change individually.

C# Code Sample: Retrieve Page Feed

The following code example retrieves the feed for the page called "Page_Title":

Sample Code

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("pages", "=Page_Title", "feed").Get();

Sample Response from executing Code

Sample response feed indicating that the page was edited four times:

<feed xmlns="http://www.w3.org/2005/Atom" version="1.0" xml:lang="en-us">
    <generator version="1.3.99.4871">MindTouch Dream XAtom</generator> 
    <updated>2007-08-29T20:12:49Z</updated> 
    <title type="text">Page Changes - Page Title</title> 
    <link rel="self" href="http://deki-hayes/@api/deki/pages/=page_title/feed?format=atom" /> 
    <id>http://deki-hayes/@api/deki/pages/=page_title/feed?format=atom</id> 
    <entry>
        <title type="text">Page Title</title> 
        <published>2007-08-29T19:14:29Z</published> 
        <updated>2007-08-29T19:14:29Z</updated> 
        <id>http://deki-hayes/Page_Title</id> 
        <author>
            <name>Admin</name> 
        </author>
        <link href="http://deki-hayes/Page_Title" rel="alternate" /> 
        <summary type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Edited 4 times by Admin (added 'myfile.jpg')</p> 
                <p>
                    <strong>2 words added, 1 words removed</strong> 
                </p>
                <hr width="100%" size="2" /> 
                <p>
                    <ins style="color: #009900;background-color: #ccffcc;text-decoration: none;">new</ins> 
                    <del style="color: #990000;background-color: #ffcccc;text-decoration: none;">original</del> 
                    text 
                    <ins style="color: #009900;background-color: #ccffcc;text-decoration: none;">2</ins> 
                </p>
            </div>
        </summary>
    </entry>
</feed>

Implementation notes 

Add notes about requirements or config values

Curl Code Sample: Retrieve Page Feed

The following command retrieves all the revisions made to page "foo" and organizes them into a feed:

Sample Code

curl -u username:password -i http://mindtouch.address/@api/deki/pages/=foo/feed

Sample Response from executing Code

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us">
  <generator version="2.0.0.17704">MindTouch Dream XAtom</generator>
  <updated>2010-01-29T00:29:05Z</updated>
  <title type="text">Page Changes - Gotham</title>
  <link rel="self" href="http://192.168.59.128/@api/deki/pages/=gotham/feed"/>
  <id>http://192.168.59.128/@api/deki/pages/=gotham/feed</id>
  <entry>
    <title type="text">Gotham</title>
    <published>2010-01-28T21:59:41Z</published>
    <updated>2010-01-28T21:59:41Z</updated>
    <id>http://192.168.59.128/Gotham#20100128215941</id>
    <author>
      <name>Admin</name>
    </author>
    <link href="http://192.168.59.128/Gotham" rel="alternate"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Edited 4 times by Admin</p>
        <ol>
          <li>4 words added, 18 words removed (Admin)</li>
          <li>3 words added (Admin)</li>
          <li>Reverted to earlier version; 3 words removed (Admin)</li>
          <li>1 words added, 1 words removed (Admin)</li>
        </ol>
        <blockquote>
          <p>
            <strong>4 words added, 18 words removed</strong>
          </p>
          <hr width="100%" size="2"/>
          <p>...</p>
          <p>
            <ins style="color: #009900;background-color: #ccffcc;text-decoration: none;">Home of the Joker</ins>
          </p>
          <hr width="100%" size="2"/>
        </blockquote>
        <table border="0" padding="5" width="80%">
          <tr>
            <td>
              <a href="http://192.168.59.128/index.php?title=Gotham">View page</a>
            </td>
            <td>
              <a href="http://192.168.59.128/Gotham?action=edit">Edit page</a>
            </td>
            <td>
              <a href="http://192.168.59.128/index.php?title=Gotham&diff=5&revision=1">View complete diff</a>
            </td>
            <td>
              <a href="http://192.168.59.128/Gotham?action=history">View page history</a>
            </td>
            <td>
              <a href="http://192.168.59.128/Special:Userban?username=Admin">Ban Admin</a>
            </td>
          </tr>
        </table>
      </div>
    </summary>
  </entry>
  <entry>
    <title type="text">Gotham</title>
    <published>2010-01-28T20:13:13Z</published>
    <updated>2010-01-28T20:13:13Z</updated>
    <id>http://192.168.59.128/Gotham#20100128201313</id>
    <author>
      <name>Admin</name>
    </author>
    <link href="http://192.168.59.128/Gotham" rel="alternate"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Edited once by Admin</p>
        <p>comment #1 added</p>
        <blockquote>
          <p>I am the Batman</p>
        </blockquote>
        <table border="0" padding="5" width="80%">
          <tr>
            <td>
              <a href="http://192.168.59.128/index.php?title=Gotham">View page</a>
            </td>
            <td>
              <a href="http://192.168.59.128/Special:Userban?username=Admin">Ban Admin</a>
            </td>
          </tr>
        </table>
      </div>
    </summary>
  </entry>
  <entry>
    <title type="text">Metropolis</title>
    <published>2010-01-28T19:57:33Z</published>
    <updated>2010-01-28T19:57:33Z</updated>
    <id>http://192.168.59.128/Metropolis#20100128195733</id>
    <author>
      <name>Admin</name>
    </author>
    <link href="http://192.168.59.128/Metropolis" rel="alternate"/>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Metropolis moved to Gotham</p>
        <table border="0" padding="5" width="80%">
          <tr>
            <td>
              <a href="http://192.168.59.128/index.php?title=Metropolis">View page</a>
            </td>
            <td>
              <a href="http://192.168.59.128/Special:Userban?username=Admin">Ban Admin</a>
            </td>
          </tr>
        </table>
      </div>
    </summary>
  </entry>
</feed>

Implementation notes 

curl flags

-u
Provides external user authentication. Note that if anonymous access is available and authentication is not forced, this flag may be omitted.
-i
Outputs the HTTP response headers. Useful for debugging.

Pages

To view a list of all pages, follow the instructions here.
  • Was this article helpful?