retrieves a file description
Name | Type | Description |
pageid | string | either an integer page ID, "home", or "=" followed by a double uri-encoded page title |
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. |
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 |
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 |
Output:
Content-type=text/plain
Use PUT:files/{fileid}/description to set the file description.
The following code example retrieves the description of the file with ID 456:
Plug p = Plug.New("http://deki-hayes/@api/deki"); p.At("users", "authenticate").WithCredentials("admin", "password").Get(); DreamMessage msg = p.At("files", "456", "description").Get(); String description = msg.AsText();
Add notes about requirements or config values
The following command retrieves the description of a file with file ID = 1:
curl -u username:password -i http://mindtouch.address/@api/deki/files/1/description
File with file ID = 71 has description string set to "Problem?"
Content-Type: text/plain
Problem?