Was this page helpful?

GET:pages/{pageid}/diff

    Overview

    public. Show changes between revisions

    Uri Parameters
    NameTypeDescription
    pageidstringeither an integer page ID, "home", or "=" followed by a double uri-encoded page title
    Query Parameters
    NameTypeDescription
    authenticatebool?Force authentication for request (default: false)
    diff{combined, all}?Result format; 'combined' shows changes to the page contents, 'all' shows in addition the before and after versions of the page with highlighted changes; default is 'combined'
    format{html, xhtml}?Result format (default: html)
    mode{edit, raw, view}?which rendering mode to use when diffing; default is 'edit'
    previousstring?Previous page revision to retrieve. 'head' by default will retrieve latest revision. Positive integer will retrieve specific revision
    redirectsint?If zero, do not follow page redirects.
    revisionstring?Page revision to retrieve. 'head' by default will retrieve latest revision. Positive integer will retrieve specific revision
    Return Codes
    NameValueDescription
    BadRequest400Invalid input parameter or request body
    Forbidden403Read access to the page is required
    NotFound404Requested page could not be found
    Ok200The request completed successfully

    Message Format

    Output:

    <content type="{contenttype}">{text}</content>

    Implementation Notes

    Setting Previous/Revision=1 refers to the earliest revision, 2 refers to the next earliest revision, and so on.  Similarly, Previous/Revision=-1 refers to the revision prior to the current, -2 refers to the revision two prior to the current, and so on. 

    This feature uses the ViewNoExecute mode output from GET:pages/{pageid}/contents to perform the diff comparison.

    Code Samples

    C# Samples

     

    Curl Samples

     

    PHP Samples

     

    Other Code Samples

     

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by