API - Delete a PID

This API uses JSON as the primary exchange format. All implementations MUST be able to produce and consume JSON.

DELETE a PID - Description

You may want to delete a defined PID. Once you have the PID url, then you can delete the PID, by just supplying it.

At the moment a nodelete profile is enforced. So the deletion of handles is deactivated.

TypeDescription
DescriptionDelete a PID
URLThe API Service URL with the PID
HTTP MethodDELETE
SecurityRequires ownership of the PID. So you must authenticate before actually deleting the file

The data you must send in order to delete are described in the following table

TypeDescriptionRequiredDefault valueExample value
suffixThe local name of the handle in the systemYesNone05C3DB56-5692-11E3-AF8F-1C6F65A666B5

Example

In this example we are going to delete of a selected PID https://epic.grnet.gr/handles/11239/05C3DB56-5692-11E3-AF8F-1C6F65A666B5

The request in curl

curl -v -u "YOURUSERNAME:YOURPASSWORD" -H "Accept:application/json" -H "Content-Type:application/json" -X DELETE https://epic.grnet.gr/api/v2/handles/11239/05C3DB56-5692-11E3-AF8F-1C6F65A666B5

The response:

  • HTTP/1.1 204 No Content: (Success)
  • HTTP/1.1 401 Unauthorized: Your username or your password is wrong
  • HTTP/1.1 404 Not found: The resource doesn't exist
  • HTTP/1.1 403 Forbidden: The operation is not permitted
  • HTTP/1.1 405 Method Not Allowed: The submitted url with PID is wrong
> DELETE /handles/11239/05C3DB56-5692-11E3-AF8F-1C6F65A666B5 HTTP/1.1
> Authorization: Basic Y2xhcmluLWVsOjUxMjdkZWIxZTJjNg==
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: epic.grnet.gr
> Accept:application/json
> Content-Type:application/json
>
< HTTP/1.1 204 No Content
< Date: Fri, 22 Nov 2013 13:05:14 GMT
< Content-Length: 0