Skip to main content

pages/{pageid}/files/{filename}/description (DELETE) (SAP KC)


Reset the file description

  • REST Method: DELETE
  • Method Access: public

Uri Parameters

Name Type Description
filename string Double uri-encoded file name. Should be prefixed with "=" if it does not have an extension.
fileid int identifies a file by ID
pageid string either an integer page ID, "home", or "=" followed by a double uri-encoded page title

Query Parameters

Name Type Description
authenticate bool? Force authentication for request (default: false)
redirects int? If zero, do not follow page redirects (only applies when {pageid} is present).

Return Codes

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

Message Format


<file id="{int}" href="{uri}">
    <description /> 
    <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}" /> 
    <page.parent id="{int}" href="{uri}">

Implementation Notes

Use GET:files to retrieve a list of files across the site or GET:pages/{pageid}/files to retrieve the files on a specified page.

C# Code Sample: Remove a File Description

The following code example deletes the description for myfile.jpg on the home page:

Sample Code

Plug p = Plug.New("");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("pages", "home", "files", "=myfile%252ejpg", "description").Delete();

Sample Response from executing Code

<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="1" href="" /> 
    <page.parent id="29" href="">
        <title>DekiWiki (Hayes)</title> 
        <path /> 

Implementation notes 

Add notes about requirements or config values

Curl Code Sample: Delete File Description

The following command deletes the description of file "foo" on page "bar":

Sample Code

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

Implementation notes 

curl flags

Provides external user authentication.
Specifies the HTTP request method.
Outputs the HTTP response headers. Useful for debugging.

Sample Response

page name = fubar, file name = trollface.jpg

HTTP Response Headers

HTTP/1.1 200 OK
Date: Wed, 27 Jan 2010 00:24:18 GMT
Server: Dream-HTTPAPI/ Microsoft-HTTPAPI/2.0
Content-Length: 2753
Content-Type: application/xml; charset=utf-8
X-Data-Stats: request-time-ms=25; mysql-queries=16; mysql-time-ms=21;
X-Deki-Site: id="default"
Via: 1.1 dekiwiki

HTTP Response Body

Content-Type: application/xml

<file id="71" revision="5" href="">
  <contents type="image/jpg" size="88820" width="469" height="428" href=""/>
  <contents.preview rel="thumb" type="image/jpeg" maxwidth="160" maxheight="160" href=""/>
  <contents.preview rel="webview" type="image/jpeg" maxwidth="550" maxheight="550" href=""/>
  <user.createdby id="1" href="">
  <revisions count="5" totalcount="5" href=""/>
  <page.parent id="567" href="">
  <properties count="2" href=" deki/files/71/properties">
    <property name="" href="" etag="109.r2_ts2010-01-27T00:24:18Z">
      <contents type="text/plain; charset=utf-8" size="0" href=""/>
      <user.modified id="1" href="">
    <property name="iscopyright" href="" etag="106.r2_ts2010-01-21T19:54:52Z">
      <contents type="text/plain" size="3" href="">yes</contents>
      <user.modified id="1" href="">
  • Was this article helpful?