Skip to main content
NICE CXone Expert
Expert Success Center

pages/{pageid}/files (GET)


Retrieves a list of files for a given page

  • 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 path

Query Parameters

Name Type Description
redirects int? If zero, do not follow page redirects.
authenticate bool? Force authentication for request (default: false)
limit string? Maximum number of items to retrieve. Must be a positive number or 'all' to retrieve all items. (default: 100)
offset int? Number of items to skip. Must be a positive number or 0 to not skip any. (default: 0)

Return Codes

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

Message Format


<files count="{int}" href="{uri}">
    <file id="{int}" href="{uri}">
        <contents type="mimetype" size="{int}" width="{int}" height="{int}" href="{uri}" /> 
        <contents.preview rel="thumb" type="{mimetype}" maxwidth="{int}" maxheight="{int}" href="{uri}" /> 
        <contents.preview rel="webview" type="{mimetype}" maxwidth="{int}" maxheight="{int}" href="{uri}" /> 
        <user.createdby id="{int}" href="{uri}">
        <revisions count="{int}" href="{uri}" /> 

Implementation Notes

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.

Files in the archive are not included in the output.

C# Code Sample: Retrieve Page Files

The following code example retrieves the files on the home page:

Sample Code

Plug p = Plug.New("");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("pages", "home", "files").Get();

Sample Response from executing Code

Sample response indicating that there is one file:

<files count="1" href="">
    <file id="456" href="">
        <description /> 
        <contents type="image/pjpeg" size="53112" width="476" height="480" href="" /> 
        <contents.preview rel="thumb" type="image/pjpeg" maxwidth="160" maxheight="160" href="" /> 
        <contents.preview rel="webview" type="image/pjpeg" maxwidth="550" maxheight="550" href="" /> 
        <user.createdby id="1" href="">
        <revisions count="2" href="" /> 

Implementation notes 

Add notes about requirements or config values

Curl Code Sample: Retrieve Page Files

The following command retrieves a list of file attachment associated with page "foo":

Sample Code

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

Sample Response from executing Code

One file, named batman.xml, attached to page titled "Bar":

<files count="1" href="">
  <file id="70" revision="10" href="">
    <contents type="text/xml" size="371" href=""/>
    <user.createdby id="1" href="">
      <email hidden="true"/>
    <revisions count="2" totalcount="10" href=""/>
    <page.parent id="565" href="">

Implementation notes 

curl flags

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


To view a list of all pages, follow the instructions here.


  • Was this article helpful?