Was this page helpful?

GET:pages/{pageid}/files/{filename}/revisions

    Overview

    public. Retrieve file revision info

    Uri Parameters
    NameTypeDescription
    filenamestring"=" followed by a double uri-encoded file name
    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)
    changefilterstring?Only show revisions having a user-action listed in this comma delimited list. Valid actions are: CONTENT, NAME, LANGUAGE, META, DELETEFLAG, PARENT (default: all actions)
    redirectsint?If zero, do not follow page redirects (only applies when {pageid} is present).
    Return Codes
    NameValueDescription
    BadRequest400Invalid input parameter or request body
    Forbidden403Read access to the page is required
    NotFound404Requested file could not be found
    Ok200The request completed successfully

    Message Format

    Output:

    <files count="{int}">
        <file id="{int}" revision="{int}" href="{uri}">
            <filename>{text}</filename> 
            <description>{text}</description> 
            <contents type="{mimetype}" size="{int}" width="{int}" height="{int}" href="{uri}" /> 
            <contents.preview rel="thumb" type="{mimetype}" maxwidth="{int}" maxheight="{int}" href="{uri}" revision="{int}" /> 
            <contents.preview rel="webview" type="{mimetype}" maxwidth="{int}" maxheight="{int}" href="{uri}" revision="{int}" /> 
            <date.created>{date}</date.created> 
            <user.createdby id="{int}" href="{uri}">
                <nick>{text}</nick> 
                <username>{text}</username> 
                <email>{text}</email> 
           </user.createdby>
      </file>
      ...
    </files>

    Implementation Notes

    A new file revision is created whenever a file with the same name is uploaded to the same page.  Use GET:files/{fileid} with the revision parameter to retrieve the file from a specified revision.

    The contents.preview element only exists if a file preview is available.  Preview generation requires the file to be an image and fall within a certain size.

    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