Skip to main content
NICE CXone Expert
Expert Success Center

pages/{pageid}/files/{filename}/description (GET)

Overview

retrieves a file description

  • 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
fileid int identifies a file by ID
filename string Double uri-encoded file name. Should be prefixed with "=" if it does not have an extension.

Query Parameters

Name Type Description
redirects int? If zero, do not follow page redirects (only applies when {pageid} is present).
authenticate bool? Force authentication for request (default: false)
revision string? File revision to retrieve. 'head' by default will retrieve latest revision. positive integer will retrieve specific revision

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 file could not be found

Message Format

Output:
Content-type=text/plain

Implementation Notes

Use PUT:files/{fileid}/description to set the file description.

C# Code Sample: Retrieve Description of File Attached to Page

The following code example retrieves the description of the file called "myfile.jpg" on the home page:

Sample Code

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
DreamMessage msg = p.At("pages", "home", "files", "=myfile%252ejpg", "description").Get();
String description = msg.AsText();

Implementation notes 

Add notes about requirements or config values

Curl Code Sample: Retrieve Description of File Attached to Page

The following command retrieves a description of file "foo" which is attached to page "bar":

Sample Code

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

Sample Response from executing Code

Retrieving file description set here.

{pageid} = meme, {filename} = trollface.jpg

Content-Type: text/plain

Problem?

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.

Attached files

To view a list of all files attached to a page, follow the instructions here.

 

  • Was this article helpful?