You use the HTTP DELETE request to delete an ACL from an object. You cannot delete an ACL from an old version of an object.
Access permission
To delete an ACL, you need write ACL or delete permission.
Request header
DELETE /rest/directory/file?type=acl HTTP/1.1
Parameter | Required | Description |
---|---|---|
directory | Yes | Folder name. |
file | Yes | Name of the file, including file extension. |
type | Yes | Use the value acl. |
Response headers
This operation does not return any request-specific response headers.
Status codes
The table below describes the HTTP status codes that have specific meaning for this request.
Code | Meaning | Description |
---|---|---|
200 | OK |
HCP successfully deleted the ACL. HCP returns this status code even if the object does not have an ACL. |
400 | Bad Request |
The request specified a conditional header, such as If-Match. If more information about the error is available, the HTTP response headers include the HCP-specific X‑HCP-ErrorMessage header. |
404 | Not Found |
One of:
|
409 | Conflict | HCP could not delete the ACL because it is currently being written to the namespace. |
Example: Deleting an ACL for an object
Here’s a sample HTTP DELETE request that deletes the ACL for an object named Q1_2012.ppt located in the quarterly_rpts directory.
Request with curl command line
curl -k -iX DELETE -H "Authorization: HCP bXl1c2Vy:3f3c6784e97531774380db177774ac8d" "https://finance.europe.hcp.example.com/rest/quarterly_rpts/Q1_2012.ppt ?type=acl"
Request in Python using PycURL
import pycurl curl = pycurl.Curl() curl.setopt(pycurl.HTTPHEADER, ["Authorization: HCP bXl1c2Vy:3f3c6784e97531774380db177774ac8d"]) curl.setopt(pycurl.URL, "https://finance.europe.hcp.example.com \ /rest/quarterly_rpts/Q1_2012.ppt?type=acl") curl.setopt(pycurl.SSL_VERIFYPEER, 0) curl.setopt(pycurl.SSL_VERIFYHOST, 0) curl.setopt(pycurl.CUSTOMREQUEST, "DELETE") curl.perform() print curl.getinfo(pycurl.RESPONSE_CODE) curl.close()
Request headers
DELETE /rest/quarterly_rpts/Q1_2012.ppt?type=acl HTTP/1.1 Host: finance.europe.hcp.example.com Authorization: HCP bXl1c2Vy:3f3c6784e97531774380db177774ac8d
Response headers
HTTP/1.1 200 OK X-HCP-ServicedBySystem: hcp.example.com X-HCP-Time: 1334858680 Content-Length: 0